Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/rc-bin-ape/cut
#!/bin/rc for(i in $*) { if ( ~ $i -d ) { shift del='-F'$1 shift } if ( ~ $i -f ) { shift col=$1 shift } } awk $del '{print $'$col' }'