in reply to Using Perl instead of awk!
Something like this should get you started:
See open and split.use strict; use warnings; my $fname = '/dir/file'; open my $fh, '<', $fname or die "error: open '$fname': $!"; while (<$fh>) { next unless /something/; my @flds = split; print "$flds[2]\n"; }
|
|---|