Advertisement

Responsive Advertisement

Shell Scripting Problem Solution

 Shell Scripting Problem Solution









Q.1 Shell scripting and profile the system

System administrators often write scripts to automate common tasks, Given a few of instances where such would be useful. Your job in this task is to write a script that displays the following information.                                                                
a. hostname information
b. file system disk space usage
c. Memory usage
d, time and date on invocation
e. list all logged in users
f. uptime to the system.


Hello guys, We can run above shell scripting problem in red hat Linux using terminal.
So Let's start.....
Extension use for create a file = .sh
To run the script use = bash, sh, ./

1.First one start your Linux System and create the file using touch command. And give .sh extension to that file.
   touch script1.sh




2. Using vim editor edit the file.

     vim script1.sh



3. Press 'i' and go to insert mode.



4. And type the code in that file. Save file using Esc :wq


5. To run the scripting file use = bash, sh, ./

    sh.script1.sh



 Final Output is here :-




To Download Code file Click here

Watch Our Video Tutorial :-


                Coming soon............................... 


Post a Comment

1 Comments