Sponsored Content
Full Discussion: Nohup Command
Top Forums UNIX for Dummies Questions & Answers Nohup Command Post 60789 by blazix on Friday 21st of January 2005 05:16:25 PM
Old 01-21-2005
#!/bin/ksh

# This script calls the weblogic start script if the file exist

if [ -f /opt/user/scripts/test.sh ]
then
echo "testing script"
su - username -c "nohup /opt/user/scripts/test.sh &"
exit $?
fi


#!/bin/ksh

# This script calls the test script if the file exist

if [ -f /opt/user/scripts/test.sh ]
then
HOME="/opt/user"
echo "testing script"
su - username -c "${HOME}/nohup /opt/user/scripts/test.sh &" // Error ksh:/opt/user/nohup:not found
exit $?
fi

I want the second script to be working.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Nohup command on Solaris

Hi, I have a general question on using the "nohup" command. As far as I've got it, submmitting a job with no hang up specified, should result in the job running until completion, regardless of whether the session that submitted the job(parent) is still active. This is very helpful when doing... (1 Reply)
Discussion started by: errolg
1 Replies

2. Shell Programming and Scripting

What's the command for nohup in Oracle

Hello, I need running the process from Oracle in backround. Thank you for your help. C.Abarca (1 Reply)
Discussion started by: cabarcaj
1 Replies

3. Shell Programming and Scripting

nohup command o/p redirection

Hi I am using nohup command in script(say nohup ls- ltr > somefile 2>&1 & ). I dont want any kind of output to be displayed on screen. When i tried the above nohup it still gives me some out put on screen like 2991 Done >somefile 2>&1 Please you let me know what is... (3 Replies)
Discussion started by: ammu
3 Replies

4. UNIX for Dummies Questions & Answers

Problem with nohup command

Hello folks, I have got a script which telnets to different boxes and runs a certain script with 3 run time args. The line from the script which does it is: (sleep 1; echo $USERID ; sleep 1; echo $PASSWD ; sleep 1 ; echo y ; sleep 1 ; echo "\r" ; sleep 1 ; echo "cd $FILEPATH" ; sleep 1 ; sleep 1... (1 Reply)
Discussion started by: Rajat
1 Replies

5. Shell Programming and Scripting

nohup command in a script.......

I want to know how to use a nohup command in the script........ I have to run following command nohup /tmp/app/statuscheck.sh & After typing this command I will type ctrl D to come to the prompt and the that command will run in backround. I want to include that command in a... (2 Replies)
Discussion started by: jayaramanit
2 Replies

6. Shell Programming and Scripting

nohup command in the script....

I want to know how to use a nohup command in the script........ I have to run following command nohup /tmp/app/statuscheck.sh & After typing this command I will type ctrl D to come to the prompt and the that command will run in backround. Even after pressing & the command is not... (3 Replies)
Discussion started by: jayaramanit
3 Replies

7. UNIX for Dummies Questions & Answers

nohup command..

Hi.. Can anybody tell me, what exactly the nohup command does & when is it used? Your help is appreciated. (3 Replies)
Discussion started by: Amol21
3 Replies

8. Shell Programming and Scripting

Issue with nohup command

Hi everyone, I am starting a nohup from a script (via scheduling system) as follows: ssh user@server "nohup command & ; exit 0" This command is not returning the command prompt untless I press "ENTER". This is causing the schedule to hang at this job and not continue with the rest of the jobs.... (12 Replies)
Discussion started by: nimo
12 Replies

9. AIX

Nohup command

I'm trying to run a compress script in the background, but I even though the script is running in the background I get "Sending nohup output to nohup.out." and the screen just stays there. How can I make the script run in background and make my command prompt come back. I was using: nohup... (2 Replies)
Discussion started by: NycUnxer
2 Replies

10. Shell Programming and Scripting

ssh a nohup command

I have a script I'm creating to spawn netcat listeners on a remote server for copying files at high speeds. The issue I'm running into is that after running the "nohup nc -l -p 12345 | tar -xvf - &" commands I can't get the remote shell to terminate. I'm not sure if this is working as intended or... (2 Replies)
Discussion started by: headcr4sh
2 Replies
NOHUP(1)						    BSD General Commands Manual 						  NOHUP(1)

NAME
nohup -- invoke a utility immune to hangups SYNOPSIS
nohup [--] utility [arguments] DESCRIPTION
The nohup utility invokes utility with its arguments and at this time sets the signal SIGHUP to be ignored. If the standard output is a ter- minal, the standard output is appended to the file nohup.out in the current directory. If standard error is a terminal, it is directed to the same place as the standard output. Some shells may provide a builtin nohup command which is similar or identical to this utility. Consult the builtin(1) manual page. ENVIRONMENT
The following variables are utilized by nohup: HOME If the output file nohup.out cannot be created in the current directory, the nohup utility uses the directory named by HOME to create the file. PATH Used to locate the requested utility if the name contains no '/' characters. EXIT STATUS
The nohup utility exits with one of the following values: 126 The utility was found, but could not be invoked. 127 The utility could not be found or an error occurred in nohup. Otherwise, the exit status of nohup will be that of utility. SEE ALSO
builtin(1), csh(1), signal(3) STANDARDS
The nohup utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. BUGS
Two or more instances of nohup can append to the same file, which makes for a confusing output. BSD
July 19, 2001 BSD
All times are GMT -4. The time now is 09:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy