The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: Using a script?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 10-03-2007
piltrafa's Avatar
piltrafa piltrafa is offline
Registered User
  
 

Join Date: Oct 2001
Location: Buenos Aires, Argentina
Posts: 77
There is no need to put the script on the bin directory.

- copy the text into a text file adding in the first line #!/bin/sh (or whatever your shell is)
- chmod +x filename.sh ( makes the text file executable
- then you can add the directory where the file is located to the user path, if you want.
- if you saved the file on /root then you can run it with:
/root/filename.sh <--- press enter

- voilá