用shell脚本 编写 判断单词是否为字典的文件

#!/bin/bash
s=`cat /usr/share/dict/linux.words`
for i in $s;do
      if [ $1=$i ];then
          echo "$1在字典中"
          exit
     fi
done
    echo "$1不在字典中"

原文地址:https://www.cnblogs.com/70xinshidai/p/11599137.html