![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Replacement for sed | dbsurf | Shell Programming and Scripting | 0 | 01-25-2008 06:47 PM |
| Regarding Replacement | rajx | UNIX for Dummies Questions & Answers | 2 | 05-22-2007 10:19 AM |
| String Replacement with Perl | Lindarella | Shell Programming and Scripting | 4 | 09-29-2006 03:05 PM |
| Replacement using sed | handak9 | UNIX for Dummies Questions & Answers | 5 | 07-13-2004 12:28 PM |
| cpu replacement. help | IMPTRUE | UNIX for Dummies Questions & Answers | 3 | 07-25-2003 09:40 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Replacement of sed with perl
Hi using the below cmd i am identifying wheether last character in each line in thousands of files as semicolon or not.If last character is semicolon i am removing semicolon .If last character is not semicolon then i am appending next line to present line .
For example my input file consists of ABC|FGH|HJK|JKK; BHJ|AAA|BBB|L NNNN|JJJJ|LLLL; JJJJJJ; out put file consists of ABC|FGH|HJK|JKK BHJ|AAA|BBB|L NNNN|JJJJ|LLLL JJJJJ I am achieving the above requirement using sed as below sed -e :a -e '/;$/!N;s/\n//; ta' -e 's/;$//' file but i have thousands of files in one directory its consuming more and more time . Can anyone replace the above requirement in perl with xargs like xargs perl option cn anyone suggest the easiest way without looping |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|