Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions