|
|
#1 |
|
Prospect
Join Date: Jan 2002
Posts: 11
|
I've read the above but I can't get my script to work.
I actually want to write a script that will connect to s database via ssh and do a sql dump. However as I'm still getting my feet wet, I thought I'd try something simple first. #!/bin/sh echo "This script is executing" ######## unfortunately, whenever I run the % runscript I get runscript: Command not found. I've done the rehash, chmod etc. But it still doesn't work... Any help is welcome. Han_Solo PS: I'm saving up for OS X Unleashed.... |
|
|
|
|
|
#2 |
|
Prospect
Join Date: Jan 2002
Posts: 39
|
run script?
I'm sure you're trying to start the script like this:
"sh yourScript.sh" .. if not, give it a try. |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
I'm new to scripting too, but is your script in your path? If you do this:
echo $path or echo $PATH (depending on your shell) you'll get a list of places the script can be put for it to be recognized. Or you could just execute your script thusly: ./runscript if you're in the same directory as your script. Let us know how things work out.
|
|
|
|
#4 |
|
Prospect
Join Date: Jan 2002
Posts: 11
|
Working.
Don't know what I did, but it did work...
Thanks |
|
|
|
|
|
#5 |
|
Prospect
Join Date: Mar 2002
Location: Australia
Posts: 33
|
Make a dir called bin in your users dir and then mv the script into that dir. You can then type the name of your script as if it was a command.
Make sure you check to see if there are any other commands with the same name. if so, change it to something that is not in use. So if you call it comp.. type comp and then <tab> to see what other commands are around with the name comp. If so, add some more compmail <tab> and see if that is free.. And so on untill you have something that works.
__________________
Cheers |
|
|
|
![]() |
|
|