Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 fiStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started