23Aug/088
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
20Aug/082
Using Bash’s Command History
Are you a linux user? do you frequently use BASH shell? If yes, then here's some bash trick you could use to raise your productivity.
First trick is, the use of CTRL+R. You can search your history using this shortcut.
Just type the command you want and press ENTER when you found it, or press right arrow to change current selected command.
silent@hacked:~$ (reverse-i-search)`mang': ls -l /media/MIX/manga/bleach/
Second trick is how to execute previous command again and again. You can do this by using the one of the following trick:
- Press Up Arrow or type !! to select previous command and press ENTER.
- Press !-N, where N is number to select last N history and execute it.
Eg: !-3 will execute your last 3 history and !-1 will execute your last history. !-1 is equal to !! or Up arrow.
That's it for now. I'll cover more trick in another posting. So, stay tune.








