Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/rc-bin-ape/ls.rc
#!/bin/rc opts=() for (i in $*) { if (! ~ %i '-*') { o = `{ echo $i |sed -e 's/L//' } if (! ~ $o '-') { opts = ( $opts $o ) } } if not { opts = ( $opts $i ) } shift } /$cputype/bin/ls $opts | tr ' ' ' ' | /$cputype/bin/sed 's/ $//'