Re: Insert caret just before specified character

"Amarendra Godbole [email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Organization SYMC
Message-ID <20150501124639.08410c57@symmactoolkit-c02n3u69g3qj.symc.symantec.com>
PLLC[U [Fri, 1 May 2015 12:38:42 -0700]:

> How do I add caret '^' before each comma ',' in text string? Trying
> this:
> 
> echo {"errors":{"subject_id":["mandatory","Contact not exist."]}} |
> sed.exe -e "s/,/^,/g"
[...]

Try enclosing the entire string in double-quotes or single-quotes,
something like echo "("errors":...}}" | sed ...

-Amarendra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.