[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] Looping over filenames in bash
On Thu, Dec 13, 2007 at 06:32:50PM +1100, Mike Abdow wrote:
> for ii in *.png; do
> convert "$ii" -resize x500 "${ii%.*}".small.png
> done
You, sirs, all of you, have blown my mind. I might stand a chance at not
sucking at shell scripting now. Thanks for the help.
- Rob
PS: I also ended up running into ${ii/.jpg/.small.png} and friends, thanks
to the above little snippet, as sort of highly-impaired regex of sorts.
Awesome.
-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.