Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Raymond Wiker Newsgroups: comp.sys.apple2 Subject: Re: Brutal Deluxe Software releases Merlin 32 Date: Sun, 11 Jan 2015 10:40:02 +0100 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: <02ec2596-dc67-4b67-a524-958e6dce6150@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="6795c6b5efa8fe68018748717e86deed"; logging-data="12203"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18WZUaMgHGiMOkNlUvU2glY" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) Cancel-Lock: sha1:625dXLNhfoSDs5gDAUQpXpQrS9M= sha1:U5kUfY53E9oW4KjP3bZenlzi2QU= Xref: csiph.com comp.sys.apple2:23543 mdj writes: > On Friday, 9 January 2015 20:58:36 UTC+10, mmphosis wrote: >> ...but, doesn't work with gnu/Linux sed. :( >> >> http://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux > > A better(?) way since sed is different across platforms is to use > something that isn't, in this case, vi in 'ex' mode: > > ex source/dl_library.c < s/%I64d/%lld/g > w > EOF > > (I didn't verify that the substitute command behaved the same under > vi, but I expect it does) > > This will achieve the same result, but be POSIX compliant. > > Matt Or just use perl: perl -pi.bak -e 's/%I64d/%lld/g' Dc_Library.c -- since no modern platform that has sed/ed/ex is likely not to have perl.