![]() |
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 |
| problem with redirect stdout to file | mlucas | UNIX for Advanced & Expert Users | 3 | 12-06-2006 10:53 AM |
| PHP Redirect | perleo | Shell Programming and Scripting | 2 | 05-11-2003 11:17 AM |
| Redirect Xterm | barisgultekin | UNIX for Dummies Questions & Answers | 1 | 07-18-2002 01:33 PM |
| Need to redirect the messages | gaur_amar | UNIX for Dummies Questions & Answers | 2 | 06-25-2002 11:00 AM |
| Redirect | <Therapy> | IP Networking | 1 | 03-20-2002 08:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Redirect Problem
I am using the time command in a script however the output of the time command will display on my screen but not my output file. Any Ideas on how to fix this?
> cat test.sh ############################# #!/usr/bin/sh for COMMAND in pwd do time ${COMMAND} done | sed "s/^/ /g" | tee -a test.out ############################# > test.sh real 0m0.00s user 0m0.00s sys 0m0.00s /tmp > cat test.out /tmp |
|
||||
|
gotcha...
since time command doesn't display on stdout.. 2>&1 does the trick..thats great. so you can play around with 2>&1..redirecting stderr to stdout and then do whatever you may want.. cheers, Devaraj Takhellambam |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|