Latest web development tutorials

Linux spell命令

Linux 命令大全 Linux命令大全

Linux spell命令可建立拼寫檢查程序。

spell可從標準輸入設備讀取字符串,結束後顯示拼錯的詞彙。

語法

spell

實例

檢查文件testfile是否有拼寫錯誤,在命令行提示符下輸入如下命令:

spell testfile 

如果文件中有單詞拼寫錯誤,則輸出如下信息:

$ spell testfile   #检查testfile 拼写错误  
scurity            #以下为有错误的单词  
tp  
LANs  
Securty  
practicl  
applcations  
necesary 

如果所檢查的文件沒有單詞拼寫錯誤,那麼,命令運行後不會給出任何信息。

檢查從標準輸入讀取的字符串。 例如在命令行中輸入如下命令:

spell 

按回車鍵後,輸入一串字符串,然後按Ctrl+D 組合鍵退出spell,屏幕上將顯示拼寫有錯誤的單詞。 如下所示:

$ spell #检查标准输入的字符串的拼写错误  
hell,this is a linx sustem! #拼写错误的字符串  
linx #以下为有拼写错误的单词  
sustem 

Linux 命令大全 Linux命令大全