R
Rocky Allen
Hi Y'all,
Having trouble with this command when placed in a perl script:
cat /tmp/filesontape | awk '{print $9}'
on the command line output is as follows:
/etc/LGTOuscsi/sjirdtag
/etc/LGTOuscsi/sjirelem
/etc/LGTOuscsi/sjirjc
output from script is as follows:
-rwxr-xr-x 1 root root 550592 Feb 12 2002 /etc/LGTOuscsi/sjirdtag
-rwxr-xr-x 1 root root 550816 Feb 12 2002 /etc/LGTOuscsi/sjirelem
-rwxr-xr-x 1 root root 550544 Feb 12 2002 /etc/LGTOuscsi/sjirjc
I read perldoc perlop for qx and it claims that it honors pipes, and
wildcards etc. any thoughts?
here is the script:
#!/usr/bin/perl
my $cpioin = '/tmp/cpioin';
my $putontape = '/tmp/filesontape';
open(FH3, "$cpioin") or die "cant get FH3 $cpioin:$!";
my @pretape = <FH3>;
close FH3;
my @posttape = qx/cat $putontape | awk '{print $9}'/;
print "@posttape";
Thanks in advance,
Rocky
Having trouble with this command when placed in a perl script:
cat /tmp/filesontape | awk '{print $9}'
on the command line output is as follows:
/etc/LGTOuscsi/sjirdtag
/etc/LGTOuscsi/sjirelem
/etc/LGTOuscsi/sjirjc
output from script is as follows:
-rwxr-xr-x 1 root root 550592 Feb 12 2002 /etc/LGTOuscsi/sjirdtag
-rwxr-xr-x 1 root root 550816 Feb 12 2002 /etc/LGTOuscsi/sjirelem
-rwxr-xr-x 1 root root 550544 Feb 12 2002 /etc/LGTOuscsi/sjirjc
I read perldoc perlop for qx and it claims that it honors pipes, and
wildcards etc. any thoughts?
here is the script:
#!/usr/bin/perl
my $cpioin = '/tmp/cpioin';
my $putontape = '/tmp/filesontape';
open(FH3, "$cpioin") or die "cant get FH3 $cpioin:$!";
my @pretape = <FH3>;
close FH3;
my @posttape = qx/cat $putontape | awk '{print $9}'/;
print "@posttape";
Thanks in advance,
Rocky