Cari History


Hitung2 buat meringankan kerjaan sendiri hehe…

#!/bin/ksh
#Pencarian History berdasarkan Kategori Tertentu
# by Beny

clear
srch=/users1/homs/history/
echo “=====================================================”
echo “= Pencarian History dalam folder AHD,CHD,SHD,dll =”
echo “= berdasarkan tanggal, dan keyword tertentu =”
echo “= =”
echo “= by Beny – Samsung VAS =”
echo “=====================================================”
echo ” ”
echo ” ”
printf “a. Tanggal History/ENTER utk TGL hari ini : “;read tgl;
printf “b. Folder History/ENTER utk FOLDER AHD : “;read fold;
printf “c. Kata Kunci /ENTER utk KEYWORD MINOR : “;read key;

tude=$(date +%Y.%m.%d)
if [$tgl = “”]
then
tgl=$tude
else
tgl=$tgl
fi

if [$fold = “”]
then
fold=’AHD’
else
fold=$fold
fi

if [$key = “”]
then
key=’MINOR’
else
key=$key
fi

mgrep “$key” -i $srch$tgl/$fold/*|pg
read apa
cari_hist

Sample output nya kurang lebih seperti ini :

SBY_inniomp:/users1/homs/MobileIII_1.4.0/bin % cari_hist

=====================================================
= Pencarian History dalam folder AHD,CHD,SHD,dll =
= berdasarkan tanggal, dan keyword tertentu =
= =
= by Beny =
=====================================================

a. Tanggal History/ENTER utk TGL hari ini : 2008.06.30
b. Folder History/ENTER utk FOLDER AHD : AHD
c. Kata Kunci /ENTER utk KEYWORD MINOR : MAJOR

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: