-1

currently I have a file that contains the text Your path: ../test/tester [hello] whatever But I want to change it to: Your path: ../../tested/text [hello] whatever I've tried sed but I believe ../ is a special character so I'm not too sure how to approach this problem.

This won't work for me.
sed s/tester/..//g;s/tester/tested/text/

user3281743
  • 295
  • 1
  • 11

1 Answers1

0

Does this solve your problem?

➜  scripts  cat example
Your path: ../test/tester [hello] whatever

➜  scripts  sed "s|../test/tester|../../tested/text|" example > example2
➜  scripts  cat example2
Your path: ../../tested/text [hello] whatever
Mike H-R
  • 7,726
  • 5
  • 43
  • 65