[NTLUG:Discuss] Sort question

Fred James fredjame at fredjame.cnc.net
Thu Apr 5 16:55:26 CDT 2012


Chris Cox wrote:
> My soln in bourne shell script:
> #!/bin/sh
> while read line;do
>         echo "$line" | tr -cs '[^0-9]' '\012' | sort -n | tr '\012' ' '
>         echo ""
> done
>
> To use: sh thescript.sh <thedatafile
>
>   
Very nice
Regards
Fred James




More information about the Discuss mailing list