Basically the -i option requires an extension on some OS's.
Created attachment 119139 [details, diff] Add extension and remove file
why dont you fix BSD sed to not be so pathetic, or start using GNU sed instead of a limited BSD one
Seeing as -i isn't in the POSIX spec for sed, it's behaviour isn't exactly standard. Seeing as you are all about adhering to POSIX atm maybe you should consider dropping the -i option altogether redirecting output to a tmp file and then moving the tmp file over the other one.
i never said -i was in POSIX ... but since -i is used pretty heavily, seems like getting BSD to make it optional can only help other projects
Created attachment 119178 [details, diff] sed ... -i '' -- file1 file 2 (In reply to comment #4) > i never said -i was in POSIX ... but since -i is used pretty heavily, seems > like getting BSD to make it optional can only help other projects Current BSD sed supports the same functionality as GNU sed, it just has a slightly different interface GNU sed sed -i -e 's/foo/bar/g' foo BSD sed sed -i '' -e 's/foo/bar/g' foo BSD sed uses getopt and GNU sed uses getopt_long. The only way of getting them to co-operate that I have found is like so. sed -e 's/foo/bar/g' -i '' -- foo Attached is a patch that allows this, + a comment explaining this.
Created attachment 119182 [details, diff] sed ... -i '' -- file1 file 2 Fix patch.
Created attachment 119186 [details, diff] eval sed ... -i '' -- file1 file 2 Dammit, eval is needed in the script - I'm sure it worked without on the commandline. Should work for sure now.
Comment on attachment 119186 [details, diff] eval sed ... -i '' -- file1 file 2 I just cannot get that to work reliably with either sed, so I guess this is the only option that works on both platforms :/
dostrow gave me access to a GBSD box, so in return i fixed gcc-config :p it uses gsed when available