On Fri, 6 Apr 2007, Jean-Baptiste Quenot wrote:
* martin-g:
This doesn't work well for me (Debian unstable, GNU bash,
version 3.1.17(1)-release (i486-pc-linux-gnu)).
It is OK with -i"" (no space).
OK I reverted the BSD/MacOSX-specific change. People will get
backups with the "-e" extension again (except GNU/Linux users). I
wonder what language except Java would be good for making those
scripts portable, Python would be good, do you have it installed?
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
;-)
Shell script is still OK
Just add:
case `uname` in
Linux)
sed -i -e ....
;;
BSD)
MAC)
sed -i "" -e ...
;;
Little bit longer but it will work for all *ix-es in the case clause
Martin