[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossig] help on shell scripts
- To: ossig@xxxxxxxxxxx
- Subject: [ossig] help on shell scripts
- From: Ng Swee Meng <sweemenghacker@xxxxxxxxx>
- Date: Sun, 10 Jul 2005 18:05:32 -0700 (PDT)
- DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=slAYBxGE3AtvQkK02jkAndnSnzUNkPrQf5ruFFPBmJGRGVR5sRpd3qPYq5xYjyk/MpS7/GYwc+8bnnO2h/W3x/WLteb8f9XAd+2HkT6PGR3hWGHPdhIdv4dhii+LwlG0jgalLQuBKuqdsazpiKM7Y0hT6M6z3SnBVql/zBp8LBo= ;
- Reply-To: ossig@xxxxxxxxxxx
- Sender: owner-ossig@xxxxxxxxxxx
i was working on a bash script to resize photo in a
directory(because my friend have pictures with a total
of >100MB). and i happen to have imagemagick on my
linux system.
the requirement is that, it is able to process every
file in the family. and exclude non-graphic file
the point,
how do i pass directory as an argument in bash?
how do i exclude other file type except picture?
this is what already finish work on:
#begin of script
#!/bin/bash
for img in $1
do
mv $img copy-$img
convert -sample 75%x75% copy-$img $img
rm copy-$img
done
exit 0
#end of script
__________________________________
Yahoo! Mail for Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
---------------------------------------------------------
To unsubscribe: send mail to ossig-request@mncc.com.my
with "unsubscribe ossig" in the body of the message