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

OS X + Sed: “extra characters at the end of l command” Error #18

Open
lmquang opened this issue Feb 19, 2018 · 0 comments
Open

OS X + Sed: “extra characters at the end of l command” Error #18

lmquang opened this issue Feb 19, 2018 · 0 comments

Comments

@lmquang
Copy link
Owner

lmquang commented Feb 19, 2018

Unlike Ubuntu, OS X requires the extension to be explicitly specified. The workaround is to set an empty string:

$ sed -i '' 's/megatron/pony/g' /path/to/file.txt

Add the -i option to sed to save the result back to input.txt.

https://myshittycode.com/2014/07/24/os-x-sed-extra-characters-at-the-end-of-l-command-error/

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

No branches or pull requests

1 participant