Skip to content

Do not use extensions only avaiable in GNU sed#440

Merged
berendt merged 1 commit intomainfrom
gh1020
May 14, 2024
Merged

Do not use extensions only avaiable in GNU sed#440
berendt merged 1 commit intomainfrom
gh1020

Conversation

@berendt
Copy link
Copy Markdown
Member

@berendt berendt commented May 14, 2024

The ~ is a GNU sed specific extension.

This one works:

$ grep -E "^configuration_git_version:"  "$RUNDIR/configuration.yml"|gsed '~s,^..*:[ ]*,,'
main

This one fails:

$ grep -E "^configuration_git_version:"  "$RUNDIR/configuration.yml"|sed '~s,^..*:[ ]*,,'
sed: 1: "~s,^..*:[ ]*,,": invalid command code ~

Also use / instead of ,

Closes osism/issues#1020

The ~ is a GNU sed specific extension.

This one works:

```
$ grep -E "^configuration_git_version:"  "$RUNDIR/configuration.yml" | gsed '~s/^..*:[ ]*//'
main
```

This one fails:

```
$ grep -E "^configuration_git_version:"  "$RUNDIR/configuration.yml" | sed '~s/^..*:[ ]*//'
sed: 1: "~s,^..*:[ ]*,,": invalid command code ~
```

Also use / instead of ,

Closes osism/issues#1020

Signed-off-by: Christian Berendt <berendt@osism.tech>
@berendt berendt merged commit 2fb9627 into main May 14, 2024
@berendt berendt deleted the gh1020 branch May 14, 2024 20:07
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

Successfully merging this pull request may close these issues.

sed error when bootstrapping

1 participant