Question: Add new code to the script MyFirstShellScript.sh so that the code of figure 1 can only be excuted if the user running the script at

Add new code to the script MyFirstShellScript.sh so that the code of figure 1 can only be excuted if the user running the script at hand is root

I need to know how to display the system calles made by program.

Here is my code bellow in linux

Add new code to the script MyFirstShellScript.sh so that the code of

Create a file called MFirstShellScript.sh, and use your editor of choice to insert the code shown in Figure 1. To run your script, type bash MyFirstShellScript.sh and press Enter. If the command m stat gives you an error, replace it with the command yzmstat. ! /bin/bash code related to Problem Set 1 for the csi 2500 class of Fall 2018 SLEEPTIME=5 while [[ $REPLY != x ]]; do clear echo -e "obtain information on: 1. Virtual memory 2. secondary storage 3 CPU 4. Processes" read -p "Enter selection [1-4], or type x to exit: " if [ $REPLY.= 1-1; then vm stat sleep $SLEEPTIME fi if [ $REPLY 2-1; then df -h du -sh sleep $SLEEPTIME fi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!