Week 3
Third week post.
Introduction
Over the past week, labs 9 and 10 were completed on the following topics:
- Text editor emacs.
- Programming in the command processor OS UNIX. command files.
Lab #9
As a result of laboratory work, I got acquainted with the Linux operating system. Gained practical experience with the emacs editor.
Tasks were completed on the following topics:
- Open emacs.
- Create a file lab07.sh.
- Type text.
- Save the file using the combination Ctrl-x Ctrl-s (C-x C-s).
- Do standard editing procedures with the text, each action must but be done with a key combination.
- Learn to use commands to move the cursor.
- Buffer management.
- Window management.
- Search mode
Lab #10
Studied the basics of programming in the UNIX/Linux OS shell. Learned how to write small batch files.
The following tasks were solved:
- Write a script that, when run, will make a backup copy of itself (then there is a file that contains its source code) to another backup directory in your home directory. In this case, the file must be archived by one of the chivators to choose from zip, bzip2 or tar. How to use the archive commands you need to find out by reading the help.
- Write an example of a batch file that processes any arbitrary number command line arguments, including more than ten. For example, script can sequentially print the values of all passed arguments.
- Write a batch file - an analogue of the ls command (without using this command itself mandas and dir commands). It is required that it give information about the desired directory and displayed information about the possibilities of accessing the files of this directory.
- Write a batch file that receives as a command line argument file format (.txt, .doc, .jpg, .pdf, etc.) and calculates the number of such files in the specified directory. The path to the directory is also passed as an argument to mandline.
Conclusions
Over the past week, I have learned and worked with the Emacs text editor. I also learned how to write small batch files. The tasks were interesting, I thought about them with pleasure. This experience will be very useful for me in my future studies and in general in life. In general, I am satisfied with the results of the past week, I completed all the work in advance and I did not have any particular difficulties.