--- [EMAIL PROTECTED] wrote:
> Hi folks,
Hi. =o)
> I'm putting together simple script for doing dumps. I have the
> command running but I can't get the output to write to my log file.
> I keep getting errors and have tried several things and none of it
> works. Please help.
>
> Here is a sample of what I'm doing :
>
> while ( my $line = <IN>){
> (system `ufsdump 0uf /dev/rmt/0n $line`);
1) -- backticks (``) run the command in a subshell and return it's
output, which in this case is being passed to system as the command
*it* should run.
2) -- system runs a command in a subshell, but only returns the error
code. Output from the command goes wherever it would have gone, which
in this case I would expect to be STDERR (since the output from the
backtick command, which is apparently what you want in the logfile,
probably isn't a valid argument to system())
> print FILEOUT $_;
2) -- nothing is setting $_ here, unless I'm mistaken. You're printing
nothing.
> I already have my filehandles defined. I'm not sure what is wrong.
(It would be better to show the line where yopu opened it, but I'll
trust you on this one. ;o)
So, here's my offhand rewrite of what I *think* you meant by the lines
above:
> while ( my $line = <IN>){
print FILEHANDLE `ufsdump 0uf /dev/rmt/0n $line`;
Better?
> Thanks
de nada. ;o]
=====
print "Just another Perl Hacker\n"; # edited for readability =o)
=============================================================
Real friends are those whom, when you inconvenience them, are bothered less by it than
you are. -- me. =o)
=============================================================
"There are trivial truths and there are great Truths.
The opposite of a trival truth is obviously false.
The opposite of a great Truth is also true." -- Neils Bohr
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]