[ale] perl or awk officienados :)

Sue Bauer-Lee sblee at tazmania.org
Mon Nov 20 10:09:16 EST 2000


It's not Linux specific, but......

To avoid reinventing te wheel (and save some time), has anyone had occassion
to sort the contents of a file based on the following (or something VERY
similar):

Each record contains a variable number of fields, generally no more than 8.
Field separator is a newline.
Record separator is 2 newlines.
Sort order - alpha ascending on each field significant to the 3rd or 4th field.
Output should appear in the same format as the input: each field separated by
a newline, each record separated by 2 newlines.

Sample data
-----------
nrdvsaxlated    Nordstrom Visa Xlated
        processAllFiles.pl -s NRDV -c nrdvis -b nrdvsaxlated
        postedi.ksh NRDV nrdvsaxlated in billdel ehpebp01:incoming

gpuxlated       GPU Xlated files 
        GPUResponse.pl -n gpuxlated.enroll
        processAllFiles.pl -s GPU -c gpureq -b gpuxlated
        postedi.ksh GPU gpuxlated in billdel ehp1:incoming ebdload.ksh

reh2ebd         Reliant HL&P
        spsGatewayInPause.ksh -s RELH -c reh2ebd -d -t tar
        inbound_loop.ksh RELH reh2ebd rsp cat ebdCommBiller.ksh
        inbound_loop.ksh RELH reh2ebd req cat ebdCommBiller.ksh
        spsFileRouter.pl -s RELH -c reh2ebd -t ebill
        rmCarriageReturn.ksh  reh2ebd  RELH
        sendwrap.ksh RELH reh2ebd ROUT

Mapin           Map Incoming EDI Data
        mapin

EDIDemo         System Demonstration
        tasklock -w EDIDemo
        mapout x12ob
        generate
        send
        edicomm
        xlate
        mapin
        tasklock -u EDIDemo

-----------------------------------------------------
Sue Bauer-Lee          |    KE4HNN
PO Box 2900            |    
Lilburn, GA 30048      |    Email: sblee at tazmania.org
-----------------------------------------------------
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list