PDA

View Full Version : How do I run .sh-files?


Xecuter
March 5th, 2006, 05:21 PM
A n00b question, I know, but how do I run .sh-files?

I've tried double-clicking, writing the filename in terminal and everything.

knalle
March 5th, 2006, 05:22 PM
write sh in front of the name in terminal:

like:

sh somescript.sh

qamelian
March 5th, 2006, 05:28 PM
There are a few ways. If you're already in the directory containing the file you could just type: ./filename.sh and press Enter.

jamesford
March 5th, 2006, 05:29 PM
afaik u can also rightclick on the file > properties > permissions and enable the top execute box, and then doubleclick the file

Xecuter
March 6th, 2006, 11:04 AM
Oh that simple? Thanks guys! :)

kvorion
March 6th, 2006, 11:54 AM
Make the file an executable first, by right clicking on it and changing permissions.

Then go to the directory that has the file and type ./scripname.sh

or bash scriptname.sh