mirror of https://tildegit.org/ben/dotfiles
19 lines
250 B
Plaintext
19 lines
250 B
Plaintext
|
#!/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;
|
||
|
}
|
||
|
|