Thanks. I've always been a little fuzzy on that whole 2>&1 business, as I
use it so rarely.



|---------+---------------------------->
|         |           "McKown, John"   |
|         |           <[EMAIL PROTECTED]|
|         |           insctr.com>      |
|         |           Sent by: Linux on|
|         |           390 Port         |
|         |           <[EMAIL PROTECTED]|
|         |           IST.EDU>         |
|         |                            |
|         |                            |
|         |           11/06/2003 03:20 |
|         |           PM               |
|         |           Please respond to|
|         |           Linux on 390 Port|
|         |                            |
|---------+---------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                          |
  |       To:       [EMAIL PROTECTED]                                                  
                                    |
  |       cc:                                                                          
                                          |
  |       Subject:  Re: Brain fart - redirect stderr/std out to a file and NOT see an 
ything after a command is run              |
  
>------------------------------------------------------------------------------------------------------------------------------|




James,

That doesn't work. Why? First, the shell redirects STDERR to *the current
STDOUT destination*, you then redirect STDOUT. Try:

tar -cvzf $HOME/hawkweb.tar /it  >/u/sy4080/tarmessages.txt 2>&1


--
John McKown
Senior Systems Programmer
UICI Insurance Center
Applications & Solutions Team
+1.817.255.3225

This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and its' content is
protected by law.  If you are not the intended recipient, you should delete
this message and are hereby notified that any disclosure, copying, or
distribution of this transmission, or taking any action based on it, is
strictly prohibited.

> -----Original Message-----
> From: James Melin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 06, 2003 3:17 PM
> To: [EMAIL PROTECTED]
> Subject: Brain fart - redirect stderr/std out to a file and
> NOT see anything after a command is run
>
>
> I am trying to re-direct output from tar  - the whole list of
> what it's
> archiving to a file so I don't see it on my terminal session.
>
> I've tried variations of  tar -cvzf $HOME/hawkweb.tar /it  &2>1
> /u/sy4080/tarmessages.txt   but I still get teh huge spew and
> nothing in
> the file. What did I not remember?
>

Reply via email to