|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 [4] 2991 [3] Done >somefile 2>&1 Please you let me know what is to be done Thanks in advance Ammu |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Code:
set +m nohup ... |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks for replying.
Still it gives me the output on the terminal Thanks in advance Ammu |
|
#4
|
||||
|
||||
|
You don't see 'done', but you see the first one. This is because your shell is interactive, use a script: Code:
$ cat s #! /bin/bash nohup "$@" > nohup.log 2>&1 & $ ./s sleep 2 $ ps PID TTY TIME CMD 17788 pts/1 0:00 bash 17810 pts/1 0:00 sleep 17793 pts/1 0:00 bash |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ssh a nohup command | headcr4sh | Shell Programming and Scripting | 2 | 12-01-2010 03:38 PM |
| Nohup command | NycUnxer | AIX | 2 | 08-09-2010 10:58 AM |
| nohup command | arvindng | Shell Programming and Scripting | 2 | 06-17-2009 10:40 AM |
| nohup command.. | Amol21 | UNIX for Dummies Questions & Answers | 3 | 10-07-2008 11:45 AM |
| Nohup Command | blazix | UNIX for Dummies Questions & Answers | 9 | 01-23-2005 05:01 PM |
|
|