learningperl01 has asked for the wisdom of the Perl Monks concerning the following question:
What I am trying to do is sort the lines by the pattern "/id\:\s?(0-9)" and if a line does not contain the "sid: number" then just print the line as it is in the file. so the new output file would contain the following#Comment *ss id addr id: 099 bbb ccc aaa *ss id addr id: 003 aaa bbb ccc #Comment 2 *333 23 ss id: 002 aaa bbb ccc *22 233333333 34432 233 44
Thanks in advance for the help and please let me know if I need to clarify anything. thanks again#Comment *333 23 ss id: 002 aaa bbb ccc *ss id addr id: 003 aaa bbb ccc #Comment 2 *ss id addr id: 099 bbb ccc aaa *22 233333333 34432 233 44
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Please help with sorting/sort
by kyle (Abbot) on Feb 14, 2008 at 16:55 UTC | |
by learningperl01 (Beadle) on Feb 14, 2008 at 17:04 UTC | |
|
Re: Please help with sorting/sort
by NetWallah (Canon) on Feb 14, 2008 at 17:41 UTC | |
|
Re: Please help with sorting/sort
by jrsimmon (Hermit) on Feb 14, 2008 at 17:38 UTC | |
|
Re: Please help with sorting/sort
by apl (Monsignor) on Feb 14, 2008 at 17:09 UTC |