dotfiles/bin/bin/f

19 lines
250 B
Perl
Executable File

#!/usr/bin/env perl
# https://blog.plover.com/prog/runN.html
my $field = shift or usage();
$field -= 1 if $field > 0;
$|=1;
while (<>) {
chomp;
my @f = split;
print $f[$field], "\n";
}
sub usage {
print STDERR "$0 fieldnumber\n";
exit 1;
}