in reply to Formatting output


It worked for me on a Linux and a Solaris system. What happens when it doesn't work.

The following does something similar as a one liner:     perl -F: -ane 'printf "%-20.20s\t%-20.20s\n", $F[0], $F[4]' /etc/passwd

Or following Zaxo's getpwent suggestion:     perl -e 'printf "%-14.14s\t%-14.14s\n", $a[0], $a[6] while @a = getpwent()'

--
John.