Skip to content

Latest commit

 

History

History
30 lines (16 loc) · 956 Bytes

edit_text_files.md

File metadata and controls

30 lines (16 loc) · 956 Bytes

2. Edit text files

Please use cd .. to go back to the top directory of the tutorial material. Then, change to the directory exercise_2.

2.1. See what is in a text file

In the directory exercise_2/, you will find a text file solution_2.1.txt. The fifth character is inside that file. To see its contents, use the command

more <filename>

2.2. Edit text files

To get character number six, you will need to create a text file in the exercise_2 directory. On Ubuntu, you can do this using the editor gedit. You can start it typing the name of the program, or

gedit <filename>

Create a text file with a name of your choice in the exercise_2 directory that contains the phrase

Please give me solution 2.2

Afterwards, run the program

./text_file_check

Hint

If you want to know more about a particular command, type

man <command>

You get shown a help page that you can leave by pressing 'q'.