ARSIP BULANAN : December 2014

Program Bash shell sederhana

19 December 2014 17:28:26 Dibaca : 3167

Soal No 1.

Contoh Sederhana bagaimana kita membuat program bash shell

Contohnya seperti dibawah ini :

kemudian kita masukan script dibawah ini :).

setelah sudah selesai tinggal anda save menggunakan control + x

dan cara untuk menjalankannya kita bisa menggunakan perinta perl,bash,sh namafile.sh

contohnya perl agus.sh seperti nama file yang saya buat tadi :).

Soal 2

Silahkan copy script dibawah

#!/bin/sh

echo "========================="

echo "= Data Mahasiswa Teknik ="

echo "========================="

echo

read -p "Silahkan masukan nama file anda :" file

touch $file

pil='yes'

while [ $pil = 'yes' ]

do

read -p "Nama :" nama

read -p "NIM :" nim

read -p "Prody :" prody

read -p "Jurusan :" jur

read -p "fakultas :" fak

read -p "Usia :" usia

read -p "Jumlah SKS :" sks

read -p "Nilai IPK :" ipk

read -p "Dosen PA :" pa

echo "nama :" $nama >> $file

echo "nim :" $nim >> $file

echo "prody :" $prody >> $file

echo "jurusan :" $jur >> $file

echo "fakultas :" $fak >> $file

echo "usia :" $usia >> $file

echo "jumlah sks:" $sks >> $file

echo "nilai ipk :" $ipk >> $file

echo "dosen pa :" n$pa >> $file

read -p "mau mengisi kembali ??" pil

while [ $pil = 'no' ]

do

echo "terima kasih, file telah tersimpan !!"

break

done

done

Soal 3 .

4.

 

5.

 

.

Kategori

  • Masih Kosong

Blogroll

  • Masih Kosong