\> This works indeed. But better use the additional quotes around $1. Just
get used to them, because $1 could contain IFS characters.



true, but in this  case it doesn't really matter how shell splits words :)


>i am cheating tho, and have sh symlinked to bash.

Why?


i learnt to use bash, and posix sh is not good enaugh any more. tho to
be fair, most of the features i like in bash are (probably)
implemented in ksh and zsh as well, i just never bothered to learn
either.

I don't see any -i option documented in the sed manpage.

-i on some seds (gsed, ssed, FBSD sed, maybe others) means ''in
place'' edit, that feature can be reimplemented with ''sed '....' file
new_file; mv -g new_file file'' (it also makes sure it generates
safe temp file, so doesn't overwrite any file accidentally). but it
doesn't exists in OBSD sed, so his answer was 'wrong'.


--
almir

Reply via email to