If it works, why change it?
But if you want you can do something like
$outfile = `ufsdump 0uf /dev/rmt/0n /dev/rdsk/c0t0d0s0`
which should capture the output into a scalar string and you can just print
or capture the output in a list context
@outfile = `ufsdump 0uf /dev/rmt/0n /dev/rdsk/c0t0d0s0`
and write some code to print to a file
> -----Original Message-----
> From: Lance Martincich [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 25, 2001 2:09 AM
> To: [EMAIL PROTECTED]
> Subject: Sending command output to a file
>
>
> Hi
>
> I am writing a script to automate a number of ufsdumps we do
> on our sun boxes. The script I am using works fine, however I
> wish to send the output of the ufsdump commands to a file and
> not display the output on the screen. The main reason is that
> this file will store other info pertaining to the system at
> the time the ufsdump was done.
>
> Currently I am using "ufsdump 0uf /dev/rmt/0n
> /dev/rdsk/c0t0d0s0 2>> /tmp/dumpfile.out" which seems to
> work, but isn't there a neater way of doing it with perl?
>
> Thanks
> Lance
>
>
>
> **********************************************************************
> Any unauthorized use and interception of this e-mail is illegal.
> If this e-mail is not intended for you, you may not copy,
> distribute or disclose the contents to anyone. This e-mail
> does not give rise to any binding legal obligations upon the
> City of Cape Town unless the City of Cape Town subsequently
> confirms the content in writing non-electronically. This e-mail
> may be confidential, legally privileged or otherwise protected
> by law. Unauthorised disclosure or copying of any or all of it
> may be unlawful. If you receive this e-mail in error please notify
> the sender and delete the message
>
> **********************************************************************
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]