0

I have a string like below

/home/adcde 

to be replaced with efgh

so the same adcde is used some where else in the script which I don't want to replace.

so If I am replacing with the below command

sed 's/adcde/efgh/g' - it replaces the all of it

so instead I want to replace the adcde that starts with a /

 sed 's/"/adcde"/efgh/g'

but it does not seem to work

any help would be appreciate?

Suren Baskaran
  • 1,228
  • 1
  • 10
  • 17

1 Answers1

0

sed 's:/adcde:/efgh:g'- solved the issue

Thanks to Benjamin for pointing it out

Suren Baskaran
  • 1,228
  • 1
  • 10
  • 17