I'm playing with
ex and I've found that removing trailing spaces for multiple files in silent mode doesn't work as expected.
The following examples doesn't work as expected (whatever I use
$ ex -s +'argdo! %s/\s\+$//e' -cxa *.* $ ex -s +'bufdo! %s/\s\+$//e' -cxa *.* (nothing is changed)
My files have trailing spaces as I've tested in git repository, so I could easily check the changes via
git diff. And in addition exactly the same command (without
-s) works as expected:
$ ex +'bufdo! %s/\s\+$//e' -cxa *.* 7 files to edit
What's more unexpected, silent mode works for other example such as:
$ ex -s +'bufdo! %s/foo/bar/e' -cxa *.*
What I'm doing wrong?
-V10 doesn't give me much useful information I guess.