How can I run .sh file in linux?
How can I run .sh file in linux?
|
You have to make it executable ('chmod +x nameoffile.sh', which will make executable for every user) and then you have to type the name of the file with the path included (if the directory where it lives isn't in the PATH variable); for instance type
Code:
/home/joe/nameoffile.sh Code:
./nameoffile.sh |
Don't forget to change permissions
chmod 700 myfile.sh or chomod 755 myfile.sh lyx0m :Pengy: |
Assuming it's a Bourne shell script the first line of the shell shouldbe:
Code:
#! /usr/bin/sh |
./nameoffile.sh should do it, but go to where it is first.
|
All times are GMT -5. The time now is 07:54 PM. |