Problem executing a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem executing a script
# 1  
Old 02-11-2008
Bug Problem executing a script

The script startserver.sh has permissions to execute.
Still the nohup command returns error with 'No such file or directory'

Any sugggestions:


[root@linuxserver /opt/app/server]
$ nohup ./startserver.sh &

Error
$ nohup: appending output to `nohup.out'
nohup: cannot run command `./startserver.sh': No such file or directory

where

[root@linuxserver /opt/app/server]
$ ls -lat
total 144
drwxr-xr-x 10 root root 4096 Feb 11 14:33 .
-rwxrwxrwx 1 root root 420 Feb 11 14:32 startserver.sh
-rwxrwxrwx 1 root root 81 Feb 11 14:29 stopserver.sh


Thanks
# 2  
Old 02-12-2008
MySQL

Hi
try this

$ nohup ./startserver.sh >> OUTFILE.txt &

or

$ nohup sh startserver.sh >> OUTFILE.txt &

always redirect the output of nohup in a file.

Regards,
Pankaj
# 3  
Old 02-12-2008
No Friend , if you will not redirect the output of nohup file it will automatically redirect nohup.out file.

See below thing.

nohup ./time.ksh &
[1] 880924
$ Sending nohup output to nohup.out.
# 4  
Old 02-12-2008
Check first line of the script file Smilie

If it is:
Code:
#!/bin/my_personal_private_non_existing_on_your_PC_shell
return 0;

Then it is quite possible that you don't have this binary to execute it.
In this case - system is not able to execute the file. Results will be as in your case.
# 5  
Old 02-12-2008
Try this ksh yourscript - Thatīs not only fot ksh fscripts and sometimes works for me.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

having problem while executing the script

Hi i am getting stuck while executing the script in the below line .Please help me out if ;then Name=`grep -i $Size $FILE|awk '{print $(NF-1),$NF}' |head -1` else Name="$Nam" fi (3 Replies)
Discussion started by: soumyamishra
3 Replies

2. UNIX for Dummies Questions & Answers

problem in Executing script in ksh

Hi, I am in ksh. below mentioned 3 commands I executed at command prompt & got the expected results. csh source csh_infa <special command> Now I have to do this in the script in ksh. I entered it as it is. #!/bin/ksh csh source csh_infa <special command> Now after... (1 Reply)
Discussion started by: girish_kanak
1 Replies

3. Homework & Coursework Questions

Problem with executing a possible if or case statement script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Create a phonebook program. It should use functions to perform the required tasks. It should be menu-based,... (1 Reply)
Discussion started by: Rgasin02
1 Replies

4. UNIX for Dummies Questions & Answers

Error Executing a script(SSH problem)

Hi i m writing a script which will fetch data from different machines and display it on single terminal. I have created a file named SERVERNAMES containing ip address of machines i need to monitor. Then for every IP i m issuing ssh command to get date on that machine. However When i m trying... (3 Replies)
Discussion started by: pinga123
3 Replies

5. Shell Programming and Scripting

Problem with executing a shell script through the cron

Hi, I have a shell script as below: ORACLE_HOME=/usr/local/opt/oracle/product/dev export ORACLE_HOME PATH=$PATH:$ORACLE_HOME/bin:/usr/bin export PATH OUTFILE=/export/home/`basename $0`.out export OUTFILE export IDEN df -k . | tail -1 | read a b c d e f echo $a >> $OUTFILE echo $b... (4 Replies)
Discussion started by: Abhinav Pandey
4 Replies

6. Shell Programming and Scripting

Problem executing a script

Hi Friends, When I try to execute one of my script script1.shl, I am getting the error message as "/tmp/sh1871978.13: cannot create" . I could not find the specified sh* file in the /tmp directory and I also checked the disk space of /tmp and it is only 60% filled. Please help me on... (5 Replies)
Discussion started by: mr_manii
5 Replies

7. Shell Programming and Scripting

Problem executing script through at

Hey fellows, i've got a probkem while executing a command through a scheduled at-job; Somehow my script starts looping, when triggered throug at; It doesnt do so if started manually. Any ideas? #!/bin/sh # atrun uid=33 gid=33 # mail www-data 0 umask 22 cd /var/django/webripper/ripper... (2 Replies)
Discussion started by: viktor4124
2 Replies

8. Shell Programming and Scripting

Problem with executing script using ssh

I'm writing a script which is meant to ssh into a remote machine, sed a file there, and write the output to a new file on the remote machine. Obviously the easy way to do this is to write and execute the script on the remote machine, but I'm trying to do this all via ssh since I like to keep and... (4 Replies)
Discussion started by: maethlin
4 Replies

9. Shell Programming and Scripting

Problem with executing a script scheduled in crontab

Hi I have written a shell script(in Solaris) in which following logic is there..... i=1 while read control do key=`echo $control | awk -F$DELIMITOR '{ print $1 }'` echo "Key Values" ${key} i=`/usr/bin/expr $i + 1` done < $CONFPATH/$CONFFILE when i execute it at prompt it... (4 Replies)
Discussion started by: Amardeep
4 Replies

10. Shell Programming and Scripting

Problem executing setuid script in perl-5.8.6

Hi, I have a script (a.pl) that can be run by anyone. The script internally has to read a file and write into few files which are owned by user 'myUser'. Has to read the following file: -rwx------ 1 myuser myuser 4986 Aug 20 18:11 my.file Has to write into following files: ... (0 Replies)
Discussion started by: sarmakdvsr
0 Replies
Login or Register to Ask a Question