![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sending stdout and stderr to a file | mistermojo | Shell Programming and Scripting | 2 | 02-04-2009 02:29 AM |
| How to redirect stderr and stdout to a file | sushantnirwan | Shell Programming and Scripting | 8 | 08-28-2008 10:23 AM |
| redirect stderr and/or stdout to /dev/null from command line | knc9233 | UNIX for Dummies Questions & Answers | 1 | 01-25-2007 12:24 PM |
| Redirect stdout & stderr and append to a file | Santi | Shell Programming and Scripting | 2 | 01-02-2006 07:58 PM |
| Redirect stdout and stderr | zcurtis | Shell Programming and Scripting | 8 | 09-02-2002 07:13 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Redirect stdout/stderr to a file globally
Hi
I am not if this is possible: is it possible in bach (or another shell) to redirect GLOBALLY the stdout/stderr channels to a file. So, if I have a script script.sh cmd1 cmd2 cmd3 I want all stdout/stderr goes to a file. I know I can do: ./script.sh 1>file 2>&1 OR script.sh cmd1 1>>file 2>>&1 cmd2 1>>file 2>>&1 cmd3 1>>file 2>>&1 but, what I want to do, is something like script.sh stdout is now 'file' stderr is now 'file' cmd1 cmd2 cmd3 Why do I want to do that? I'm just curious :-) Thanks a lot Isi PS: I guess that must be called 'channel duplication' or something like that |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|