[PLUG] Rename script
Russell Evans
revans at e-z.net
Fri Apr 26 06:00:01 UTC 2002
I know this has been answered, but I was wondering if this works with other
shells besides Bash?
for i in * ; do mv "$i" ${i##*_} ; done
Thank you
Russell
On Thu, 25 Apr 2002 17:06:34 -0700, Michael Montagne said:
> I need a shell script to rename many files. The files names look like:
> "N Clackamas Conformance Vol 2 01-18-00_S607.tif" and
> "N Clackamas Conformance Vol 2 01-18-00_S608.tif".
> I want to strip the prefix and just have S607.tif and S608.tif.
> I think the prefixes are all the same.
> For sure they all have an underscore preceding the part that I want.
> The easy part is that they are all in the same directory.
>
>
More information about the PLUG
mailing list