homepage Welcome to WebmasterWorld Guest from 23.22.2.150
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
How do I test run this shell script?
matthewamzn

5+ Year Member



 
Msg#: 3007542 posted 3:50 pm on Jul 14, 2006 (gmt 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

 

encyclo

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



 
Msg#: 3007542 posted 4:05 pm on Jul 14, 2006 (gmt 0)

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

[b]./[/b]backupscript.sh

coopster

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



 
Msg#: 3007542 posted 4:13 pm on Jul 14, 2006 (gmt 0)

Don't forget to make the script executable ;)

MattyMoose

10+ Year Member



 
Msg#: 3007542 posted 10:40 pm on Jul 14, 2006 (gmt 0)

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


sh -x backupscript.sh

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

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