You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
First off, thanks for this script, can't wait to use it once I can get it to work. For now though, when I run it I sed gives the error above many times.
I'm using Mac OS X 10.6.1 /usr/bin/sed, which doesn't seem to have a --version option, but the sed manpage has the date May 10, 2005 at the bottom as well as the following note:
The -E, -a and -i options are non-standard FreeBSD extensions and may not be
available on other operating systems.
The text was updated successfully, but these errors were encountered:
Cheers for pointing that out. Might be able to get around it using a tmp file to store the processing output and then cat-ing it back into the file. I'll have a look.
Looks like in this version of sed, -i takes a mandatory extension argument, so that when editing files in-place, it will create backups with the specified extension. You can pass a zero-length argument however to forgo backups:
$ echo foo > test
$ sed -i "" s/foo/bar/ test
$ cat test
bar
Thanks for the additional info, it seems that for portability and speed it might be reasonable to rewrite this in Python (someone has already done it) so I might switch over to that. Save on these little issues, even though the bash implementation has a old school charm to it.
First off, thanks for this script, can't wait to use it once I can get it to work. For now though, when I run it I sed gives the error above many times.
I'm using Mac OS X 10.6.1 /usr/bin/sed, which doesn't seem to have a --version option, but the sed manpage has the date May 10, 2005 at the bottom as well as the following note:
The text was updated successfully, but these errors were encountered: