Welcome to WebmasterWorld Guest from 50.16.24.12

Forum Moderators: bakedjake

How do I test run this shell script?

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

10+ Year Member



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 Jul 14, 2006 (gmt 0)

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



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

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

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



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

10+ Year Member



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


sh -x backupscript.sh
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved