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.
I am running it on a text input prior to trying to load it to a database. Just tried it again and i am checking the output now, so I am not sure if it worked yet.