Replace string

Hi

a.txt

abc|xyz
abc|zyc

I want to replace abc with abc1/abc2 using sed

I tried with but its not working

sed 's/abc/\abc1/abc2\/g' a.txt

Thanks,
Akil

sed 's/abc/abc1\/abc2/' a.txt

Regards

try this

sed 's/abc/abc1\/abc2/g'

Hi
Thanks,Its working

Thanks,
Akil

sometimes it helps to change the deliminator'

sed 's!abc!abc1\/abc2!' a.txt

does not have to be a / !!!!!!!!!!!!!!!!, but you must do a \ to exit the meta char "/" is a meta char,, see google regx
sed 's|abc|abc1\/abc2|' a.txt

No, you don't need the backslash if you use a different delimiter.