[Novalug] Need sort script
James Ewing Cottrell 3rd
JECottrell3@Comcast.NET
Sun Dec 5 11:43:40 EST 2010
On 12/2/2010 5:02 PM, Jon LaBadie wrote:
> On Thu, Dec 02, 2010 at 01:48:14PM -0700, geoffm@companionway.net wrote:
>> Just for grins I wrote an awk code snippet which I *think* does this as
>> well:
>> awk 'BEGIN{RS="GO"}
Did you mean Perl? Don't write awk scripts!
>>
>> {
>> data[$RN]=$0;
> data[NR]=$0; # did you mean NR?
>
>> }
>> END {
>> n=asort(data);
>> for(i=1;i<=n;i++)
>> {
>> print data[i];
>> }
>> }' myfile.sql
>>
>> Double - triple check me as my QA department is always out to lunch :)
>> Geoff
More information about the Novalug
mailing list