Arief Yudhawarman wrote:
On Thu, Jun 28, 2007 at 04:59:21PM +0700, Arief Yudhawarman wrote:
Misalkan direktori samba adalah /home/samba/public.
Scriptnya seperti ini:
#!/bin/sh
#
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin
DIR="/home/samba/public/"
fileschanged $DIR | while read file; do
if `echo "$file"|grep -qi ".*.jpgs$"
then
convert -resize 50% "$file" "$file"
fi
done
exit 0
Ralat, kurang tanda "`" di akhir baris
if `echo "$file"|grep -qi ".*.jpgs$"
Yang benar:
if `echo "$file"|grep -qi ".*.jpgs$"`
Sebetulnya dari awal emang saya dah tambahin "`", tapi msh tetep error :)
isinya :
[EMAIL PROTECTED]:~/sekar$ cat resize.sh
#!/bin/sh
#
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin
DIR="/home/byte/sekar/"
fileschanged $DIR | while read file; do
if `echo "$file"|grep -qi ".*.jpgs$"`
then
convert -resize 50% "$file" "$file"
fi
done
exit 0
errornya :
./resize.sh: 10: grep: not found
./resize.sh: 10: grep: not found
btw, saya google ndak nemu nih error ginian :(
btw, bedanya ./script.sh dengan script.sh & apa ya?
-dhani
--
FAQ milis di http://wiki.linux.or.id/FAQ_milis_tanya-jawab
Unsubscribe: kirim email ke [EMAIL PROTECTED]
Arsip dan info milis selengkapnya di http://linux.or.id/milis