sed to remove pattern ','
Andy Harrison
ah54 at httpsite.com
Thu Apr 10 09:47:10 PDT 2003
-----BEGIN PGP SIGNED MESSAGE-----
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On 10-Apr-2003, adrian kok wrote message "sed to remove pattern ','"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> data: 'peter','30 Woodroad, CA','USA'
> 'coral','110 Foreest','UK'
>
> to
> 'peter|30 Woodroad, CA|USA'
> 'coral|110 Foreest|UK'
>
> and I used the following but failed
>
> sed -e 's/\','/\|/g
>
For one thing, you don't have a trailing quote. Even still, it's easier just
to use double quotes in a case like this:
# echo \',\' | sed "s/','/|/g"
|
#
~~
Andy Harrison
ah##@httpsite.com
ICQ: 123472 AIM/Y!: AHinMaine
[full headers for details]
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQCVAwUBPpWgB1PEkLgodAWVAQHE6AP/fyQocZK0y21EJmis+Ob7YuCZY9gbbOD/
ARF4rTdo9gL0/5xcbTITqSt3kMeH/XQm7qFoiS+KnzCdYaJwns85wjvITOjBWq3x
XBzBDiNP+Td5DxDlcZX0BUQ/HMTw7nYL7stoi4iC1vu2Y90XiohBzHFlH1I8dzd1
HDeiwvZ+daU=
=8FrY
-----END PGP SIGNATURE-----
More information about the freebsd-questions
mailing list