I bet APL's solution to this would be like 2 weird symbols. I was just introduced to it by my senior colleague today, and it's ... dense.
- Vignesh Mainframe Admin -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Shane Ginnane Sent: 17 April 2014 05:48 To: [email protected] Subject: Re: Sorting CSV data that begins with an IP address This serves as another "tool for the job" example. The sort in *nux is as simple as: sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 ipaddress.file How easy is that ?. Even OMVS has sort that should handle that. For the real output required, I'd pipe the output of that to gawk and use an associative array indexed on the first three octets of the IP address. Looks like the OMVS awk is missing the GNU extension of match() to use an array for splitting the IP address, but that can be worked around. REXX ? phooey. Shane ... ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN MARKSANDSPENCER.COM ________________________________ Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
