Made command into a script but now won't run


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Made command into a script but now won't run
# 8  
Old 06-13-2007
Quote:
Originally Posted by patwa
May I ask out of curiosity what the /bin/sh -x does? Is the -x to make it an executable? And what is the /bin/sh?
/bin/sh is the shell that interprets your script. Until your script is run by some interpretor, all it is is a series of bytes in a file system.

the "#!/bin/sh" tells the operating system to run this script with this interpreter, aka the shell.

the "-x" makes /bin/sh spit out debugging lines that describe it's activities, once you have debugged the script remove the "-x".
# 9  
Old 06-13-2007
Thanks, looks like I'll have to do some debugging as the --exclude isn't working for rsync.

H.
# 10  
Old 06-15-2007
Hi, I know you have to escapte certain characters in Unix (and programming) but how do you do it when it's in a file path?

I want to add this to my rsync command:
Code:
exclude=/patwa/.cpanel/

But I found that it doesn't like the full stop there, I tried wrapping the command in quotes:
Code:
exclude="/patwa/.cpanel/"

But that didn't go down well either. Maybe:
Code:
exclude=/patwa/\.cpanel/

?

Your tips appreciated as always.

H.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script won't run because hardware won't produce display

Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies

2. Shell Programming and Scripting

While read won't run keyboard function

I am using while read do/ done to retrieve menu item. Works as advertised, no problem. I am using this hack function "pause" to stop script execution and wait for keyboard "enter" key to continue. Sort of break point function. Also works fine with one exception - it does not work when used... (4 Replies)
Discussion started by: annacreek
4 Replies

3. Shell Programming and Scripting

Script for telnet and run one command kill it and run another command using while loop

( sleep 3 echo ${LOGIN} sleep 2 echo ${PSWD} sleep 2 while read line do echo "$line" PID=$? sleep 2 kill -9 $PID done < temp sleep 5 echo "exit" ) | telnet ${HOST} while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies

4. Shell Programming and Scripting

how to run an already made script run against a list of ip addresses solaris 8 question

how to run an already developed script run against a list of ip addresses solaris 8 question. the script goes away and check traffic information, for example check_GE-VLANStats-P3 1.1.1.1 and returns the results ok. how do I run this against an ip list? i.e a list of 30 ip addresses (26 Replies)
Discussion started by: llcooljatt
26 Replies

5. Solaris

SunFire V440 Quad gigabit ce1 won't run Gig

Hi there. My first time posting so apologies for any indescretions in advance. :o I've got two SunFire V440 servers running Solaris 5v10. Both have a quad Gigabit ethernet card fitted, both have the same symptom; that is, I can't get the first port ce1 to run Gigabit. Motherboard ports are ce0 and... (10 Replies)
Discussion started by: fixit9660
10 Replies

6. UNIX for Dummies Questions & Answers

tip: Simple script won't run in cygwin - vim editor involved

I ran into this issue and thanks to various postings in various forums, was able to figure out the solution but didn't see one posting that laid the whole issue out cleanly. So thought the following might help others ... ------------------------------------------------------------------------... (2 Replies)
Discussion started by: oxysep
2 Replies

7. Ubuntu

Toshiba Laptop Won't Run Bluetooth with Ubuntu

I am running Ubuntu 8.1 on a Toshiba Satellite P105-S9337 with built-in Bluetooth hardware. I cannot get the Bluetooth hardware to work with my Microsoft Bluetooth mouse. I have installed the tosh software with no luck. Does anyone have an idea as to what to try. I have several kernel mods... (0 Replies)
Discussion started by: tjloeb
0 Replies

8. Solaris

smc won't run on a regular user

Hi All, I'm getting this all the time with a regular user (after I do su - and smc): It appears you are attempting to run the graphical Solaris Management Console from a terminal which does not have a suitable 'DISPLAY' environment. Please check your 'DISPLAY' settings and that the user... (5 Replies)
Discussion started by: itik
5 Replies

9. UNIX for Dummies Questions & Answers

Cron won't run properly

I am new to unix, and this is my 1st post on this board. Looking for some advice about a cron job in my server. I am running a cron task that references a script which runs several other scripts and compiles them into a report and emails it to me. If I run the script manually, I will... (2 Replies)
Discussion started by: Steeler_fan
2 Replies

10. UNIX for Dummies Questions & Answers

Why won't my script run?

On the following script that I get an error when I try to execute as root: #./mv_log.sh bash: /root/util/mv_log.sh: Permission denied #!/usr/bin datetag=`date --date='1 day ago' +"%b%d%Y"` logname=`find /opt/bea/wlserver6.1/config/*/logs/ -iname 'access.log0*' -mtime -1 -print` mv... (4 Replies)
Discussion started by: darthur
4 Replies
Login or Register to Ask a Question