![]() |
|
|
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 |
| replace a character with another character | satish@123 | Shell Programming and Scripting | 8 | 05-13-2009 04:04 PM |
| Replace certain character with a new a new line. | djsal | Shell Programming and Scripting | 8 | 01-11-2008 12:59 PM |
| to replace a new line character | chan | Shell Programming and Scripting | 2 | 01-11-2008 12:56 PM |
| replace character with tr | tmxps | UNIX for Dummies Questions & Answers | 3 | 09-29-2005 08:32 AM |
| How would I replace the 9th character of every line in a file? | LordJezo | Shell Programming and Scripting | 5 | 09-01-2004 12:51 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Replace a character in last line
Hello Sed Experts,
I have got a file which contain entries as below pmNoOfSwDownHsCong, pmUlUpswitchAttemptHigh, pmUlUpswitchAttemptLow, pmUlUpswitchSuccessHigh, pmUlUpswitchSuccessLow, pmUpswitchFachHsAttempt, pmUpswitchFachHsSuccess, I want to replace the the comma "," in the last line with a space. Can you please help me with this in sed Thanks a lot in advance Mohammed |
|
||||
|
That's a cool catch !
![]() Usually for these kind of formatting where we would be mostly interested in removing the last occurring ' , ' character ( in most of the cases if its there which doesn't add meaning ) But anyway I should have been attentive ! ![]() |
|
||||
|
Well, I am into the habit of making the replacement global. and does any one have the list of characters which has to be escaped? I suggested that because i didnt had the unix box to cross check that. Nevermind, thanks for the corrections
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|