0

I want to replace below line with next line in all the files. So what sed pattern is used for this. I have tried lot but not figured that out..

checkToken($token['token']) checkToken($token) 

This is what I have tried

sed -i -- 's/checkToken\(\$token\['token'\]\)/checkToken\(\$token\)/g' get_officers_v2.php 
1
  • What do you mean by all files? Does this command work on a single file? Commented Apr 16, 2019 at 9:51

1 Answer 1

1

You just need to get your escape-characters (\) on the right place like:

sed -ie "s/\(checkToken(\$token\)\['token'\])/\1)/" get_officers_v2.php 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.