Hi,
Hope this the right forum.
Some time back Jussi helped with a script for deleting HTML tags. Worked fine.
Now have a problem removing the " character from a text file. Tried Sed and modifying the original script but could not get it to remove the offending ".
Eventually used the search and replace but it took 6 hours to find and replace 2500000 instances of " with a blank.
There must be a faster way.
This is to be done every month so any help in speeding it up would be appreciated.
Thanks
Phil
Sed script help
-
- Posts: 7
- Joined: Thu Nov 15, 2007 1:02 pm
Hi Phil,
For example, given this file data:
Running this sed command:
produces this result:
Cheers Jussi
The s/\"/ /g command should work.Tried Sed and modifying the original script but could not get it to remove the offending "
For example, given this file data:
Code: Select all
This"is"a"test"string
This"is"a"test"string
This"is"a"test"string
This"is"a"test"string
This"is"a"test"string
Code: Select all
sed "s/\"/ /g" test.txt
Code: Select all
This is a test string
This is a test string
This is a test string
This is a test string
This is a test string
-
- Posts: 7
- Joined: Thu Nov 15, 2007 1:02 pm