Running a .sh file
Hello, I'm trying to install epijs and the final step is to run a file with the extension .sh. How do I go about doing this?
Do I use the command prompt window? Can I just double click on it? Also, does anybody know how to convert c source code, that's supposed to be used with a castle compiler, so it can be compiled with gcc? I look forward to hearing from you soon, Cheers, Dom. |
I think in console you will need to type:
./filename.sh then press enter not sure if you have to be root but it never hurts to be safe. |
Hi,
You can run the .sh file from the command prompt window. Just open a terminal window and cd to the directory that contains the .sh file. Then type : [root@localhost root] ./<filename.sh> (without the '< >' signs) This should work. If it dosen't then probably the file is not executable and u will have to make it executable. Type : [root@localhost root] chmod +x <filename.sh> [root@localhost root] ./<filename.sh> This should work. Refer to the chmod man pages for more help ciao. |
if you just type the path to a file it will try to execute it e.g.
/opt/kde/bin/k3b will start the K3b cd tool on my box as well as ./filename you can also use the syntax sh filename as noted above the file has to have the relevant permissions.... so sayeth a unix admin........... |
Quote:
I run all my .sh files by doing: Code:
$ sh ./whatever.sh |
The .sh extension might also mean that the script file doesn't use any bash extensions. Starting the program as 'sh <filename>.sh will run bash in a mode compatible sh.
Mostly, a downloaded file or a file in cdrom may not have executable bit set, or will have a different owner. using 'sh <filename>.sh' will save you the trouble. The extension itself means nothing to the system, but is just a convention and visual clue. |
Nice one, cheers people, what should happen in the command window after that? When I've installed other things there's normally a huge amount of text scrolls up the screen as it installs, but with this there wasn't, is this normal?
|
You said it was the final step. Perhaps you've already done most of the work. If the script installs pre-compiled binaries, it may simply need to copy files to target directories. I don't know that this particular installation does. If it is a script, you could read it to find out what is does.
|
All times are GMT -5. The time now is 01:01 PM. |