3 ms·
It's definitely better than shell for quick file processing :) Check out this fantastic cut replacement (thanks to mjd): #!/usr/bin/perl my $field = shi
by wazoox 16y ago
It's definitely better than shell for quick file processing :) Check out this fantastic cut replacement (thanks to mjd):
#!/usr/bin/perl
my $field = shift or usage();
$field -= 1 if $field > 0;
while (<>) {
chomp;
my @f = split;
print $f[$field], "\n";
}
sub usage {
print STDERR "$0 fieldnumber\n";
exit 1;
}