Professional Documents
Culture Documents
Lab2
Lab2
ID: 20521542
Class: CS4323.N11.CTTT
OPERATING SYSTEM
LAB X’S REPORT
SUMMARY
Task Status Page
Section 2.5 Task 1 Done From 2 to 9
Task 2 Done 10
Task 3 Done 10
Task 4 Done 11
Self-scrores: 8
*Note: Export file to PDF and name the file by following format:
Student ID_LABx.pdf
1
Section 1.5
1. Task 1
EX 2-1:
2
- By default, the ls command will print the name of all the files and directories only. To get
the additional information and a cleaner view, use the flag “-l”
Fig 1.2.2: Command line execution “chmod +x try_variablebles.sh” and “ls -l try_variables.sh”
- When running try-variables.sh from the command line, we will get the following rendering
result:
EX 2-3:
3
Fig 1.3.2: Results of command paragraph 2-3
EX 2-4:
EX 2-5:
4
Fig 1.5.1: Command paragraph for example 2-5
- "echo -n" prevents adding a new line at the end of the text
5
EX 2-7:
EX 2-9:
6
Fig 1.9.1: Command paragraph for example 2-9
- The while_for.sh script uses the [ ] command to check the value of variable $foo is still less
than or equal to 16 or not. If there is, the command while loop will print the cumulative sum
of the variable $foo
EX 2-10:
7
Fig 1.10.2: Results of command paragraph 2-10
- The script will fall into a loop waiting for us to log in. Until we type "user" , we will see the
screen the first picture shows the message that the until loop is over
EX 2-11:
EX 2-12:
8
Fig 1.12.1: Command paragraph for example 2-12
EX 2-13:
2. Task 2
9
Fig 2.1: The program allows to enter the name and mssv
3. Task 3
4. Task 4
10
Fig 4.1: The program that allows input of a string
11