Saturday, August 08, 2009

Tips #1 : Grab Files and E-mail Immidiately

Aku seringkali menggunakan script ini utk grab files from unix server...

snippet code drpd aku:-

mkdir GT
count=1

for i in `cat list.txt`
do
ls $i.xml
echo $count . INV$i
cp $i.xml GT/$i.xml
count=`expr $count + 1`
done

tar -cf GT.tar GT
gzip GT.tar

(cat list.txt; uuencode GT.tar.gz GT.tar.gz) mailx -m -s "UNIXsvr : GT Files" yusairi.nazri@u.com.my

end of code snippet;

1 comment:

wow gold buy said...

beautiful blog