Skip to main content
Memanggil history (bahagian II)

Pada siri yang lalu kita telah mempelajari bagaimana untuk memanggil baris arahan mengikut jujukan nombor pada history.

Kali ini kita menggunakan awalan huruf/rangkai kata pada history.


Katakan kita melaksanakan 3 ARAHAN iaitu echo $PATH, cat /proc/version dan date

$ echo $PATH
/usr/local/sbin:/usr/local
/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

$ cat /proc/version
Linux version 2.6.28-14-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009

$ date
Rab Ogos 12 12:42:56 MYT 2009


Rekodnya...

$ history
1 echo $PATH
2 printenv
3 echo $PATH
4 cat /proc/version
5 date
6 history

Kita cuba cara yang lalu... menggunakan baris pada kolum nombor
$ !1 && !5 && !4
echo $PATH && date && cat /proc/version
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Rab Ogos 12 12:43:15 MYT 2009
Linux version 2.6.28-14-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009

Cuba guna awalan huruf pada arahan... rujuk "history" di atas.. "
$ !e && !d && !c
echo $PATH && date && cat /proc/version && date && cat /proc/version
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Rab Ogos 12 12:43:36 MYT 2009
Linux version 2.6.28-14-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009
Rab Ogos 12 12:43:36 MYT 2009
Linux version 2.6.28-14-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009



:-)

Comments

Popular posts from this blog

Gue dengan S2 gue. Sronok banget!
Danga Bay, Chevrolet Optra and bio...(eh?) I thought it was Debian(haha). My colleague point me to the AirAsia flight turbin and he told me, "Macam debian punya logo" I saw a spiral on top the turbin blades. Pretty much like Debian Logo That's spark me to shoot for a pix. And I was warned by the airport staff. Uh,uh. Flash lamp will spark burst,eh? I was presented my "mock" research proposal. Suggested "Profiling Bioinformatics Application Behavior on Distributed Computing Architecture". Eh, will this gonna be bioinformatics specific or hardware optimization specific.or? Flashback: I spent almost a week at the office. When it's Subh azan,went back to my house for bath and pray. Reading all the journals and papers was not funny,really. Tough eye balls. No world cup. Ewh. And have some VCD lure. Uh,uh. you gonna be kidding. Anyway, I learned a lot and UTM SLAB Research Course is no joke. Really. My proposal has been corrected with comments so I have