-
Notifications
You must be signed in to change notification settings - Fork 0
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 commands are not portable #75
Comments
As a workaround, you can There doesn't seem to be a convenient alternative to Since the main environment where this is an issue is Mac, and there's a straightforward way to use GNU |
I'd assume that the GNU version also supports chaining multiple commands with |
I can confirm that sed -i \
-e 's/# $/#/g; /get_ipython()/d; $ d' \
"${nb_file%.ipynb}.py" works with both BSD sed and GNU sed. As for the workaround I'm not using brew, but MacPorts which installs GNU sed as |
When running
static.sh
locally on macOS, thesed
command fails:It seems that this is because the BSD
sed
does not accept multiple-e
options, instead multiple commands have to passed to the same-e
separated by;
. In addition, the BSD sed does not understand the--
to mark the following arguments as filenames.The text was updated successfully, but these errors were encountered: