EG:
$ head /etc/passwd | ./expand-nicely --input-separator ':' root x 0 0 root /root /bin/bash daemon x 1 1 daemon /usr/sbin /usr/sbin/nologin bin x 2 2 bin /bin /usr/sbin/nologin sys x 3 3 sys /dev /usr/sbin/nologin sync x 4 65534 sync /bin /bin/sync games x 5 60 games /usr/games /usr/sbin/nologin man x 6 12 man /var/cache/man /usr/sbin/nologin lp x 7 7 lp /var/spool/lpd /usr/sbin/nologin mail x 8 8 mail /var/mail /usr/sbin/nologin news x 9 9 news /var/spool/news /usr/sbin/nologinThe usage message looks like:
$ ./expand-nicely --help
Usage: ./expand-nicely --input-separator ' *|\t' --maxsplit 3 --output-separator ' ' --help
--input-separator re the regular expression used to divide lines of input into fields
--maxsplit n split each line into a maximum of n+1 columns, where the n+1th may contain
zero or more occurences of your separation regex. 0 says to split on all
occurences
--output-separator string the string used to separate fields in adjacent output columns
You can e-mail the author with questions or comments: