pwck

pwck

Post by Low Lay H » Thu, 21 May 1998 04:00:00



Hi,

Could someone tell me how to send the output of pwck to a file?
I have tried "pwck > file", but doesn't work.

TIA.
--
---------------------------------------------------------------------------
Lay-Hua Low                            
SingNet                        

My Home Page http://www.singnet.com.sg/~layhua
Frequently Asked Questions http://www.singnet.com.sg/helpdesk
----------------------------------------------------------------------------

 
 
 

pwck

Post by andy » Thu, 21 May 1998 04:00:00


pwck 2>file

pwck output is on stderr

--
Andy

-----------------------------
All viewpoints expressed in this communication are those of the individuals
involved and do not reflect the opinions or positions of any other indivdual
or organisation unless expressly stated thus.


>Hi,

>Could someone tell me how to send the output of pwck to a file?
>I have tried "pwck > file", but doesn't work.

>TIA.
>--
>---------------------------------------------------------------------------
>Lay-Hua Low
>SingNet

>My Home Page http://www.singnet.com.sg/~layhua
>Frequently Asked Questions http://www.singnet.com.sg/helpdesk
>---------------------------------------------------------------------------
-


 
 
 

pwck

Post by rg.. » Thu, 21 May 1998 04:00:00



: Hi,

: Could someone tell me how to send the output of pwck to a file?
: I have tried "pwck > file", but doesn't work.

: TIA.
: --
: ---------------------------------------------------------------------------
: Lay-Hua Low                          
: SingNet                              

: My Home Page http://www.singnet.com.sg/~layhua
: Frequently Asked Questions http://www.singnet.com.sg/helpdesk
: ----------------------------------------------------------------------------

Quote:> redirects only STDOUT , not the STDERR.

You need to do :

pwck >& file  ( for csh)

pwck > file 2>&1  ( for sh/ksh)

Cheers,

--
-------------------------------------------------------------------
Raman Garg                      Sr. UNIX/ClearCase System Administrator
Oracle Corporation              *..Remove NOSPAM from mail to reply..*
--------------------------------------------------------------------
Disclaimer: The opinions expressed above do not necessarily represent  
those of my employer Oracle Corporation ( or for that matter my own :-)

 
 
 

pwck

Post by Richard B. John » Thu, 21 May 1998 04:00:00


Howdy.

Try using the "tee" command.

In this case, try something like:

pwck | & tee -a file

where the "file" is wherever you want the output from the command to be.

Also, look at the 'script' command...

Regards,

Rich Johns


> Hi,

> Could someone tell me how to send the output of pwck to a file?
> I have tried "pwck > file", but doesn't work.

> TIA.

 
 
 

pwck

Post by Kevin J.Del » Fri, 22 May 1998 04:00:00


pwck only ever has output when there IS a problem, therefore it will come
out on STDERR (file descriptor 2)

therefore to capture output you have to re-direct SDTERR

pwck 2>/tmp/pwck.out

************************************************************************

Unix Systems
Administrator
Dow Jones Markets

Tel: +44 171 832 9000
Fax: +44 171 832 9390
***********************************************************************


> Hi,

> Could someone tell me how to send the output of pwck to a file?
> I have tried "pwck > file", but doesn't work.

> TIA.
> --
> ---------------------------------------------------------------------------
> Lay-Hua Low                                
> SingNet                            

> My Home Page http://www.singnet.com.sg/~layhua
> Frequently Asked Questions http://www.singnet.com.sg/helpdesk
> ----------------------------------------------------------------------------