1751780 Members
4345 Online
108781 Solutions
New Discussion

Nohup question

 
SOLVED
Go to solution
W.L. Alsemgeest
Occasional Advisor

Re: Nohup question

In a other nohup question I remember the following solution:
Make a script that first do a sleep for, lets say 100 sec, and then perform your job.
sometimes the nohup is not working correct and the sleep is is forsing the job to run correctly with "nohup".
After starting the script, close your terminal. The job is now running as a nohup job and after the sleep your program will run correctly.

Try it.
aku76
New Member

Re: Nohup question

So here's my script:

 

doit:

 

#!/usr/bin/ksh

 

 

sleep 10  # had to add this to get nohup to work

 

cat fie | myperlscript > file.out

 

exit

# end of script

 

I do

$ nohup doit &

 

$ exit

 

if I don't put the sleep in, it warns that I have running jobs, I have to type exit again, and nohup kills my process.

 

myperscript just reads stdin and prints it to stdout adding line breaks every 80 chars after the nearest '>'with no line break.

 

The file (xml) is so huge ( and all one line ) that I can't use sed to do this because it runs out of memory hence the perl script.  I am doing nohup, so I can go to bed and get the result in the morning.