Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sed is BRE and -E flag (extended) in MacOS #12

Open
hazartilirot opened this issue Apr 29, 2023 · 0 comments
Open

sed is BRE and -E flag (extended) in MacOS #12

hazartilirot opened this issue Apr 29, 2023 · 0 comments

Comments

@hazartilirot
Copy link

hazartilirot commented Apr 29, 2023

The issue is... it won't work as shown in the lesson:

sed -i -E 's_(amigoscode/amigoscode-api:)([^"]*)_\1'123456789'_' Dockerrun.aws.json

if you want it to work with the -E flag (extended mode), place a pair of single quote between two flags.

sed -i '' -E 's_(amigoscode/amigoscode-api:)([^"]*)_\1'123456789'_' Dockerrun.aws.json

or you may not use the extended mode you therefore need to escape each braces:

sed -i s_\(hazartilirot/hazartilirot-api:\)\([^\"]*\)_\1'123456789'_' Dockerrun.aws.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant