Rushton Martin wrote:
I knocked up the enclosed under Cygwin:
#!/bin/sh ( cat <<EOTx admin ankush admin amit powerusers dinesh powerusers jitendra EOTx ) | awk ' { grpnm[$1] = grpnm[$1] ", " $2 } END { for (i in grpnm) { print i ": " substr(grpnm[i], 3) } } ' | sort
<snip> Why use cat? Why not just stick the filename in the command line, right after the closing ', and before the pipe?
mark