Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
3_4_format.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
94.21 Кб
Скачать

5 Laboratory assignment

  1. Create a file tree.list list of files in your home directory;

  2. Create a file without using the command touch. (:> Filename).

  3. Redirect stderr to file errors.

  4. Redirecting output (stdout) to file "filename".

  5. Redirecting stdout and stderr to file "filename".

  6. Using redirection, file descriptors to do the following:

echo 1234567890 > File # Write a string to a file "File".

exec 3 <> File # Open "File" and connect descriptor

3.

read -n 4 <& 3 # Read 4 symbols.

echo -n . > S3 # Enter point symbol.

exec 3>&- # Close the handle 3.

cat File # ==> 1234.67890

  1. Using conveyors to sort the contents of all files in the directory, remove duplicate rows, the result is stored in a file result-file (cat *. txt \ sort I uniq> result-file).

  2. Redirect stdin using exec.

  3. Redirect stdout using exec.

6 Requirements for the content of the protocol

  1. Name of laboratory work.

  2. Objective.

  3. The results of the assignment.

  4. Brief description of the work done.

  5. Conclusions of the work done.

  6. Date, signature of the student visa is a teacher.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]