Skip to content

Ensure GNU sed works like BSD sed #11

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joeytwiddle
Copy link

Before this change, the script would fail on Linux, with a sed error

@joeytwiddle
Copy link
Author

joeytwiddle commented Mar 16, 2023

According to the Linux man page, -u causes sed to flush its buffers more often.

In my experience, this is the option to use to get realtime streaming output from sed. (It's the closest thing to line-buffering.)

@joeytwiddle
Copy link
Author

joeytwiddle commented Mar 16, 2023

This manpage says the BSD version of sed also accepts the -u argument. man page

In which case the simplest solution would just be to use -u instead of -l without any checking.

However, I'm not convinced that all Macs have that version of sed.

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.

1 participant