在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 <字尾字元串> 設定字尾字元串。