How to use sed?
#12087
Replies: 1 comment
-
Try one of these: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to do a global find and replace and having no luck. When searching the issue tracker here, I see people saying to use
sed
, but there doesn't seem to be any details on how to do it. I've done a bunch of googling, read tutorials on sed, and I've asked AI to help.Just trying to replace "/usr/bin/php" with "/usr/bin/env php". I've tried:
:sh sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g'
:sh sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g' */*
:sh sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g' *
:sh sed -e 's|\/usr\/bin\/php|/usr/bin/env php|g'
:sh sed -e 's|\/usr\/bin\/php|/usr/bin/env php|g' */*
:sh sed -e 's|\/usr\/bin\/php|/usr/bin/env php|g' *
:sh sed -g -i 's|\/usr\/bin\/php|/usr/bin/env php|g'
:sh sed -g -i 's|\/usr\/bin\/php|/usr/bin/env php|g' */*
:sh sed -g -i 's|\/usr\/bin\/php|/usr/bin/env php|g' *
:sh sed -g -e 's|\/usr\/bin\/php|/usr/bin/env php|g'
:sh sed -g -e 's|\/usr\/bin\/php|/usr/bin/env php|g' */*
:sh sed -g -e 's|\/usr\/bin\/php|/usr/bin/env php|g' *
| sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g'
| sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g' */*
| sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g' *
$ sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g'
$ sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g' */*
$ sed -i 's|\/usr\/bin\/php|/usr/bin/env php|g' *
And other permutations. I don't understand how this is supposed to work. I exited helix and tried
sed
in the command line, but nothing seems to work there either.Any help would be appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions