網路城邦
上一篇 回創作列表 下一篇   字體:
[SHELL] korn - history command
2006/07/20 14:33:39瀏覽543|回應0|推薦1
不同於 bash 的 !
ksh 使用 r 作為重複執行 history 中命令的方式
以下列出常用的比較
bash ksh 作用
!! r 重複上一個命令
!18 r 18 重複history裡編號第18的命令
!g r g 重複最近的以g為開頭的命令
我不會 r main=comp g 重複最近的以g為開頭的命令
並將其中的 main 換成comp

ksh 裡 history 的用法
history 1 3 只顯示 1 - 3 的命令
history -r 1 3 只顯示 1 - 3 的命令,並以 reverse的方式顯示
history -2 只顯示前兩個命令
history '字串' 只顯示最近的'字串'命令開始到上一個命令裡的history資料

bash 裡 history 的用法
ㄟㄟㄟ,我不會.,....以前都只會 history , !! !g , etc

參考來源 : http://www.kornshell.com
裡的http://cdfinfo.in2p3.fr/Services/Informatique/
DOCU/munix.html#Command%20Language
自己組成一航ㄅ



Sincerely C.S.Julius
Think Do, I Will

富翔資訊管理顧問有限公司
( 知識學習語言 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=csjulius&aid=361039