contoh program linux

10:54 PM freya 0 Comments


#!/bin/sh
#myprog.sh
#
echo $a
echo "=============================="
echo "=      MANAGEMENT FILE       ="
echo "=============================="
echo "1. Cari File"
echo "2. Copy File"
echo "3. Hapus File"
echo "4. Lihat Isi File"
echo "5. Lihat Isi Directory"
echo "6. Lihat PID Proses Ini"
echo "=============================="
echo -n "Pilihan Anda ? "
read jawab

a=`clear`
if [ $jawab -eq '1' ]
then

y=`date | cut -c1-30 >> myprog.log`
z=`date +"--> Menu 1 dipilih" >> myprog.log`
echo $y
echo $z

echo $a
echo -n "Pattern File ? "
read pf

cmd=`find / -name $pf`

if [ $?=0 ]
then
echo "Sedang mencari file, mohon tunggu..."
echo $cmd
else
echo "File tidak ada"
fi

echo "Tekan untuk mengakhiri program"
read enter

elif [ $jawab -eq '2' ]
then
y=`date | cut -c1-30 >> myprog.log`
z=`date +"--> Menu 2 dipilih" >> myprog.log`
echo $y
echo $z

echo $a
echo -n "Pattern File Sumber ? "
read pfs
[ -f $pfs ]
echo -n "Directory Tujuan ? "
read dt
if [ -d $dt ]
then
cp $pfs $dt
echo "Berhasil dicopy"
else
echo "Error : $dt bukan berupa directory"
fi
echo "Tekan untuk mengakhiri program"
read enter

elif [ $jawab -eq '3' ]
then
y=`date | cut -c1-30 >> myprog.log`
z=`date +"--> Menu 3 dipilih" >> myprog.log`
echo $y
echo $z

echo $a
echo -n "Directory File (tambahkan slash diakhir directory) ? "
read dfi
echo -n "Pattern File yang akan dihapus ? "
read pfh
cmd1=`rm $dfi$pfh`
echo "hapus file $dfi$pfh"
echo "Tekan untuk mengakhiri program"
read enter

elif [ $jawab -eq '4' ]
then
y=`date | cut -c1-30 >> myprog.log`
z=`date +"--> Menu 4 dipilih" >> myprog.log`
echo $y
echo $z

echo $a
echo -n "Nama File ? "
read nf
if [ -f $nf ]
then
cat $nf
else
echo "Error : $nf tidak ditemukan"
fi
echo "Tekan untuk mengakhiri program"
read enter

elif [ $jawab -eq '5' ]
then
y=`date | cut -c1-30 >> myprog.log`
z=`date +"--> Menu 5 dipilih" >> myprog.log`
echo $y
echo $z

echo $a
echo -n "Nama Directory ? "
read nd
echo "Opsi Perintah : [a]. Tampilkan singkat [b]. Tampilkan lengkap"
echo -n "Inputkan opsi perintah ? "
read jwb
if [ $jwb='a' ]
then
b=`ls -1 $nd`
echo $b
elif [ $jwb='b' ]
then
c=`ls -l $nd`
echo $c
fi
echo "Tekan untuk mengakhiri program"
read enter

elif [ $jawab -eq '6' ]
then
y=`date | cut -c1-30 >> myprog.log`
z=`date +"--> Menu 6 dipilih" >> myprog.log`
echo $y
echo $z

echo $a
echo "Proses ID untuk program ini adalah $$"
echo "Tekan untuk mengakhiri program"
read enter

else
y=`date | cut -c1-30 >> myprog.log`
z=`date +"--> Menu $jawab dipilih" >> myprog.log`
echo $y
echo $z

echo $a
echo "Menu tidak ada"
echo "Tekan untuk mengakhiri program"
read enter

fi

0 comments:

Lyric epik high - one

10:43 PM freya 0 Comments

hello im back, now this time, i just want to post a lyric from epik high the tittle is one, but i just post the english version which is truly touchy in my opinion :



ONE!
Time is tickin′. T-Time is tickin′, tickin′.
Time is tickin′, T-Time is tickin′ away…

(Tablo)
I want to see your tears pour out, pour out without reason
No one knows inside your heart, The glass fragments raging a storm

(Tablo)
The wounds become a sickness, All doors become a wall
I’ve become an enemy in the mirror, doesn’t it hurt?

(Mithra)
[I'll] keep anyone from knowing about you, [I'll] leave the breath to tighten out
I’ll force you to choose the end, (aren’t I bad?), I’ll take away all reason in this world for you to to stand

(Mithra)
Without the choice of the road back, [I guess] you’ll walk to the end
Your breath would probably end before my heart

(JiSun)
Wounds… Scars… Tears… Flowing
(When you cry. though you try. say goodbye. the time is tickin′)

(JiSun)
You are wandering through death, (I’ll save you…)
(When you cry. though you try. say goodbye. the time is tickin′)
You are the one.
When you’re walking in shadows
(When I’m panicking in the shadows, my breath does the same)
you are my savior
I’ll reach my hand out to you
(When all the doors in the world close for me, I’ll support you with my hand)
you are the one. you are my savior.
Time is tickin′. T…

(Mithra)
Your hand set the world on fire, You closed everyone’s eyes
The suffering that was reflected in your eyes like stars become your city

(Mithra)
Are your still dreaming, sleeping? Are you measuring all the tears you’ve shed?
Hope is a paper boat that sinks, isn’t it sad?

(Tablo)
Maybe you wake up drenched in sweat at night, Is consciousness crawling on the floor?
Are you thinking it’s the end, are you ok? ’cause I understand

(Tablo)
I’m a scar on your broken body, I’ll erase the tears you’ve hidden away in your shattered marriage
I’ll grab your hand With my hand and trust you

(JiSun)
You are wandering through death, (I’ll save you…)
(When you cry. though you try. say goodbye. the time is tickin′)
You are the one.
When you’re walking in shadows
(When I’m panicking in the shadows, my breath does the same)
you are my savior
I’ll reach my hand out to you
(When all the doors in the world close, I’ll support you with my hand)
you are the one. you are my savior.
you are the one. you are my savior.

(Tablo)
Do you have wounds, do you have scars, Are you wandering through shadows?

(Tablo)
Do you have wounds, do you have scars, Are you wandering through shadows?
(Faith, Destiny, Love.)
you′re still beautiful to me.
You are the one.
When you’re walking in shadows
(When I’m panicking in the shadows, my breath does the same)
you are my savior
I’ll reach my hand out to you
(When all the doors in the world close for me, I’ll support you with my hand)
Time is tickin′. T-Time is tickin′, tickin′.
Time is tickin′, T-Time is tickin′ away…
My savior.

ONE!

0 comments: