Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

poput ycestcom etc7ppp retc/printcap Jetc/proftle /etc/pro c/protocols /etc/puls

ID: 3906834 • Letter: P

Question

poput ycestcom etc7ppp retc/printcap Jetc/proftle /etc/pro c/protocols /etc/pulse /etc/python /etc/python2.7 /etc/python3 Jetc/py trol Statements Control statements allow you to use multiple commands at once or run additional commands, depending on the success of a previous command. Typically these control statements are used within scripts, but they can also be used on the command line as well. How will you use a control statement to execute either the command "pwd" or the command "whoami 2 I Command: Summer 2018 History command a. What command you will use to view all the commands executed/entered earlier from the terminal? WS 99+

Explanation / Answer

We can use control statements as follows:


if [ "`ls -A /home/autosys/archive`" ]; then rm /home/autosys/archive/*.*; fi

Now if ls command is success then only rm command is executes. We can use
while loop also at the command line.