Freelancer's Playground! Learn Programming, The Freelancer's Way

23Aug/084

Clever Use of Alias

My friend, Rio has made a tutorial on how to write a bash script that use our own mother language.
So, instead of using this snippet:

echo -e "\n-------- CONTOH PERULANGAN ---------"
for (( i=1; i<=5; i++ ))
do
   echo -n "$i "
done

We'll do it this way:

cetak -e "\n-------- CONTOH PERULANGAN ---------"
untuk (( i=1; i<=5; i++ ))
lakukan
   cetak -n "$i "
selesai
  • Wuuih, keren juga tuh..
    Pernah lihat trik yg hampir sama di echozine
    bedanya yg di ezine itu utk dos, dan pake bahasa
    Jawa...
  • baru ngerti kalau bash script punya perulangan kaya C/AWK gitu.. for (( i.. ))
    <div>silent:</div>

    Launchernya pake bash, jangan sh. bash test.sh (dengan test.sh) berisi seperti diatas akan jalan dengan lancar.

  • Weh weh... aku urung mudeng :D
    <div>silent:</div>

    Ahuehuehuehuehue, Kan masih bisa belajar:D.

  • rio
    thanks for the link mas bayu...
blog comments powered by Disqus