Archive

Archive for July, 2012

Running two unix processes in the background

I am a little worried about this. The parentheses create a subshell and the ampersand puts this subshell into the background. The subshell then uses nohup to run the first process and then it uses nohup to run the second process. The problem is that the subshell itself is not nohup’ed. 

I think that
nohup sh -c “( A ; B )” & 
will avoid this problem.

 

Taken from : http://www.unix.com/shell-programming-scripting/6161-running-two-processes-background.html

Categories: Tech stuff

Multiple lines into a single line using awk

ps -ef | grep sqlplus | cut -d'' -f2 |awk '{x=x" "$1} END {print x}'