look命令詳解,linux
在linux系統中,look指令是用於英文單字的查詢的,僅需給予它欲查詢的字首字符串,它就會顯示所有開頭字符串符合該條件的單字。
語法:look [-adf][-t<字尾字符串>][字首字符串][字典文件]
參考例子:
查詢file文件中以L開頭的行:
[root@linux265 ~]# cat file
LINUX!
Linux is a free unix-type opterating system.
This is a linux testfile!
Linux test
[root@linux265 ~]# look L file
LINUX!
Linux is a free unix-type opterating system.
參數:
-a 使用另一個字典文件web2,該文件也位於/usr/dict目錄下
-d 只對比英文字母和數字,其餘一慨忽略不予比對
-f 忽略字符大小寫差別
-t <字尾字符串> 設置字尾字符串。