forked from colonelpanic/dotfiles
16 lines
343 B
Awk
Executable File
16 lines
343 B
Awk
Executable File
#!/usr/bin/env gawk -f
|
|
BEGIN {
|
|
column_count=split(cols,column_numbers," ");
|
|
}
|
|
{
|
|
for(i=1; i<=column_count; i++) {
|
|
if(column_numbers[i] < 0)
|
|
printf "%s", $(NF + 1 + column_numbers[i])
|
|
else
|
|
printf "%s", $column_numbers[i]
|
|
printf "%s", OFS
|
|
}
|
|
|
|
printf "%s", ORS
|
|
}
|