![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| nohup.out | ramky79 | AIX | 5 | 10-23-2007 03:28 AM |
| compare null with non-null | nitin | Shell Programming and Scripting | 8 | 11-04-2006 03:58 PM |
| Help on nohup | bobbyjohnz | UNIX for Advanced & Expert Users | 3 | 10-18-2006 08:56 AM |
| Nohup | miwinter | UNIX for Dummies Questions & Answers | 3 | 07-21-2006 02:20 AM |
| Redirection or piping error message | mariner | Shell Programming and Scripting | 2 | 05-10-2005 12:04 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
error piping nohup to /dev/null
Hi,
I have a script as follows: #!/bin/sh nohup ./my_program >& /dev/null & However, i get a "Generated or received a file descriptor number that is not valid" whenever I run it. running the command up in prompt is ok though. if i change the first line to #!/bin/csh i get a then: then/endif not found. Pardon my ignorance but I really can't solve this problem. Can anyone kindly offer some advice? |
| Forum Sponsor | ||
|
|
|
|||
|
...or how about...
nohup ./my_program >/dev/null 2>error.log & that is, if you don't care about standard output... but just wanna see stderr messages. if you intend to do this a lot... or permanently with this script, you may want to consider adding within the script something like this: exec 1>/dev/null exec 2>error.log (or exec 2>&1 if you want no output at all) |