,
Share with your friends 

To save a output in a file using shell script(for example ping)

7 ratings Views 132 
Author: Avinash.R. (Avinash.R. Maharaj)  View Profile |  View other solutions by this author

Question / Problem


How to save the output in a file by using shell script?(for example ping)

Solution

The command is
vi name.sh
ping 10.0.0.1 > name
:wq

To run the shell script use the command
       sh name.sh
To see the output use the command:
     cat name
     You will receive the result of the ping.





Applies to

Red Hat Linux ,Solaris

Rank It

Login to rank it

Report


Advertisement