On 12 June 2016 at 18:09, Vincent Belaïche <[email protected]> wrote: > Even simpler is the following: > > --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8---- > in_input_funnies=`echo "$in_input" \ > | $SED -e 's![^}#$%&^_{~]!!g' -e 's!\(.\)!\1\'' > !g' | uniq` > --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8---- > > The trick is simply to add a tailing '' just before the newline, this > does not change the content of the argument passed to sed, but prevents > sh from seeing the sequence \NEWLINE.
Thanks a lot, it looks obvious when you see it. > > Anyway, I had to make another fix: you need to have the filename as an > argument of its own, otherwise MSYS can't do its path name conversion > ticks. After all, the whole thing about catcoding rather than explicit > ecaping (ie replacing for instance '~' by '\string~') is to keep the > filename unchanged. > > Attached is a patch with the two changes: > > - the passing \NEWLINE to sed stuff > > - making input filename an argument of its own. Committed and uploaded!
