nothing happens when I execute a script
Linux 2.6.32-400.21.1.el5uek #1 SMP Wed Feb 20 01:35:01 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
the script starts with a #!/bin/sh and then exports the PATH also the permissions are 777 But nothing actually happens when I execute it using sh scriptname.sh I have written scripts earlier but am not able to figure out what I am missing Please help Thanks |
Please show the actual script as thus far it is impossible to tell if anything should actually happen?
Also, what do you expect to happen? |
Code:
#!/bin/sh |
Ok ... so firstly, please use [code][/code] tags when displaying code or data.
You have provided your script ... cheers, but you did not answer my question ... what do you expect to see happen? On a brief look at that script I cannot see that it will display anything to the screen unless an error happens. So please advise what the problem is more specifically? |
My apologies, thanks for being patient.
This exports a table (80 Gig) and this takes time when I execute the script using sh scriptname.sh I cannot see the script as a process when I do a ps -ef|grep scriptname when I try to run it using nohup sh scriptname.sh & the screen immediately outputs Code:
"Done scriptname.sh" |
What does the log file say?
|
no log file gets created.
|
Why are you using both nohup and &? What happens if you don't add the &? The duplication might be part of the problem.
|
when I execute the script using sh scriptname.sh I cannot see the script as a process if I do a ps -ef|grep scriptname
|
Please suggest.
|
can you show us the output of:
Code:
cat -A your-script-name.ksh also try putting the line set -xv as the second line in the script. |
Yes I was editing in windows based notepad ++
there is a dollar sign at the end of each line not sure if it is abnormal I see that in other files as well when I run your command Code:
echo "Executing ${0} ..." >> $LOG_FILE$ |
Just to confirm ... all the paths to files used for the script exist?
|
Quote:
try running it with set -xv enabled. or debug it with echo's placed before and after each if. |
I place an echo and the echo executes
its only the echo that is executing, nothing else Update: okay the password file was missing, when I checked my mail for that subject line, I had about 20 or so mails there is an exit after that if clause, so if password file is not found, the script exits. That was fixed and now it works fine. Thanks so much for your involvement. |
All times are GMT -5. The time now is 06:57 PM. |