![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| How to edit a txt file ? | RRVARMA | Shell Programming and Scripting | 4 | 05-30-2008 08:40 AM |
| Edit value in File | sewood | Shell Programming and Scripting | 1 | 03-18-2008 02:11 AM |
| How to edit env file | duke0001 | UNIX for Advanced & Expert Users | 3 | 02-16-2007 11:43 AM |
| file edit help | sentak | Shell Programming and Scripting | 10 | 11-14-2006 08:20 AM |
| Edit an ISO / dd file? | WIntellect | Filesystems, Disks and Memory | 4 | 11-20-2002 05:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
edit a file using perl
Hi,
sample file looks like this.. <hp> <name> <detail>adsg</detail> ... ... </name><ft>4264</ft> </hp> I need to edit the last but one line. I want the format to be .. <hp> <name> <detail>adsg</detail> ... ... </name> <ft>4264</ft> </hp> Note: in the thread it says using "ksh" .. but i need it using perl .. sorry abt that.. Thanks Last edited by DukeNuke2; 04-16-2008 at 03:55 AM.. Reason: changed title |
|
||||
|
I'm not sure I understand the question.
Code:
# first half of script goes here perl -pe 's/></>\n</g' file # second half of script goes here Code:
first --half -of "pipeline" | perl -pe 's/></>\n</g' | second --half |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|