![]() |
|
|
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 |
| sed - replace $ | tjmannonline | UNIX for Dummies Questions & Answers | 2 | 10-09-2009 07:38 AM |
| awk - replace number of string length from search and replace for a serialized array | otrotipo | Shell Programming and Scripting | 1 | 07-10-2009 01:04 PM |
| Replace in VI | preethgideon | UNIX for Dummies Questions & Answers | 3 | 11-27-2008 01:42 AM |
| replace | charandevu | Shell Programming and Scripting | 6 | 04-07-2008 12:30 PM |
| replace last / by | | naikaa | Shell Programming and Scripting | 6 | 01-17-2008 02:19 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Using SED to Replace \|
I have been trying for a couple of hours now to use sed to replace a string in a file. The file is delimited by pipes (|) and I have tried writting the script several different ways.
The problem is that when there is a slash prior to a delimiter that it is being kicked out by my DB. So I am trying to remove them all. sed -e 's:\|:|:g' input > output sed -e 's/\|/|/g' input > output I've also tried sed -e 's/\\|/|/g' input > output and many other variations of this. However so far I have not had any luck. It will run, however it will not remove the text and replace it with just a pipe. If anyone has any suggestions it'd be appreciated. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|