Nt1430 Unit 3 Exercises

425 Words2 Pages
Thomas Sanders Unit 3 Exercises NT1430 1. While executing the shell scans and tries to find an executable with the same name as the command. To run multiple commands just use the AMPERSAND (&) at the end of a command line. 2. A PID number is a process identification number, a PID is simply a large number assigned by the operating system that identifies the command running. 3. A. $ ls section* B. $ ls section[1-3] C. $ ls i* D. $ ls *[13] 4. A. Input output redirected= $ grep \$Id < *.c > id_list B. With only Input redirected=$ grep -i suzi < addresses C. Only output redirected=$ grep -il memo *.txt > memoranda_files D. Within a Pipe= $ file /usr/bin/* | grep "Again shell script" | sort –r The…show more content…
Path variable specifies the directories in the order the shell should search them. 4. A.Echo $person You would get the following output= zach b. echo ‘$person’ you would get the following output= person c. echo “$person” you would get the following output = zach 5. You have to type the simple filename of the file that holds the script. Or you can type a relative pathname. Also you type bash followed by the name of the file. Linux uses the read builtin then the CAT to read the script. Then the CAT utility to display the file. 6. A. Once the commands are executed, zach’s working directory is as follows (/home/zach/grants/biblios). Once cdpath is set and the working directory is not specified in cdpath, cd will search the working directory only after the directories specified by cdpath has been searched. 7. Once $ sleep 30/ cat /etc/services is entered there is no output from sleep. CAT gets its input from /etc/services. The sleep command must run till complete before the shell will display anything. Advanced exercises 1. $ cat a pid=$PPID line=$(ps | grep $pid) echo $line | cut --delimiter=" " --fields=4 2. A. The echo command sees two arguments.

More about Nt1430 Unit 3 Exercises

Open Document