[plug] It's alive... It's ALIVE!

Nick Bannon nick at ucc.gu.uwa.edu.au
Thu Oct 12 23:29:03 WST 2000


On Thu, Oct 12, 2000 at 11:15:12PM +0800, Nick Bannon wrote:
[...]
>   mv "$i" "`echo $i | sed 's/\.jpg$/_orig.jpg/'`"
>   mv "$TMPFILE" "$i"
[...]

Oops, the other thing I was going to tweak was this ;
  mv -i "$i" "`echo $i | sed 's/\.jpg$/_orig.jpg/'`"
  mv -i "$TMPFILE" "$i"

mv -i is a good precaution when testing these sorts of scripts. It means
that it stops and asks you before overwriting files - something you
usually want to avoid unless you do it deliberately with a ">"...

Nick.

-- 
  Nick Bannon  | "I made this letter longer than usual because
nick at it.net.au | I lack the time to make it shorter." - Pascal



More information about the plug mailing list