The UNIX and Linux Forums  

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 UNIX 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: 76
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á
Reply With Quote