[Bf-funboard] Bf-funboard Digest, vol 44-3 renaming files

Stephen Swaney sswaney at centurytel.net
Wed Apr 9 18:23:39 CEST 2008


On Wed, Apr 09, 2008 at 01:20:57PM +0300, Toni Alatalo wrote:
> 
> > Luckily for for final0001.dpx we used bash-fu to do the renaming for us.
> >
> > for i in final????.dpx; do j=`echo $i | sed 's/final/final0/g'`; mv
> > "$i" "$j"; done
> >   
> i also had to do the same during Orange, wrote an equivalent renaming 
> script in Python. was certainly nasty, so i guess it's a +1 from me.

Linux (or at least opensuse) has a rename command that does
  rename from-pattern to-pattern file-mask.

The above example would be 
  rename final final0 final????.dpx

-- 
Stephen Swaney			
sswaney at centurytel.net


More information about the Bf-funboard mailing list