(Solved) : Writing Simple Shell Script Vi Display Line 1 Script Displays Date Time Username Line 2 Cu Q42682617 . . .

Writing a Simple Shell Script
       VI display
Line 1       # This script displays thedate, time, username and
Line 2       # current directory.
Line 3       clear
Line 4       echo “Date and timeis:”
Line 5       date
Line 6       echo
Line 7      echo “Your username is: `whoami`n”
Line 8      echo “Your current directory is:c”
Line 9      pwd

Answer the following question using the above shell scriptprogram:
⦁   I just created and save the above file in VI. To runit as a shell script program, what do I need to do next?

⦁   What would I type to run the program?

⦁   Why does the # sign do in the above program line 1and 2?

⦁   What does line 3 do in the program?

⦁   What does line 4 do in the program?

⦁   What does line 5 do in the program?

⦁   What does line 6 do in the program?

⦁   What does line 7 do in the program?

⦁   What does line 8 do in the program?

⦁   What does line 9 do in the program?

Expert Answer


Answer to Writing a Simple Shell Script VI display Line 1 # This script displays the date, time, username and Line 2 # current dir…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?