[NTLUG:Discuss] Sort question

Chris Cox cjcox at acm.org
Thu Apr 5 17:19:04 CDT 2012


first tr should be '[0-9]'  get rid of the carat

> 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
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>




More information about the Discuss mailing list