Welcome to WebmasterWorld Guest from 54.145.58.37

Forum Moderators: bakedjake

Message Too Old, No Replies

How do I test run this shell script?

     
3:50 pm on Jul 14, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Jan 27, 2005
posts:229
votes: 0


I've made a script for backing up my websites. I want to test it. It's located here:
/etc/cron.hourly/backupscript.sh

How can I force it to run? When I navigate to the cron.hourly directory and type backupscript.sh, I just get this message:
: bad interpreter: No such file or directory

4:05 pm on July 14, 2006 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9068
votes: 4


If you are in the directory, then the path to run the script would be:

[b]./[/b]backupscript.sh
4:13 pm on July 14, 2006 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12541
votes: 1


Don't forget to make the script executable ;)
10:40 pm on July 14, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 28, 2003
posts:366
votes: 0


If you want to see everything that it's doing, including variables, etc, run it with:


sh -x backupscript.sh
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members