Skip to content

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

@hazartilirot

Description

@hazartilirot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions