shell拼写检查,利用Linux字典

rename

#find path -type  f -name "*.mp3" -exec mv { } target_dir \;    

#mp3 file mv dir_file

#digui

#find path -type f -exec rename 's/ /_/g'  {} \;

# 检查给的单词是否为字典

#!/bin/bash

word=$1

grep "^$1$" /usr/share/dict/british-english -q

if [ $? -eq 0 ]; then

  echo $word is a dictionary word;

else

  echo $word is not a dictionary word;

fi

posted @ 2019-03-14 22:56  zhg1016  阅读(286)  评论(0编辑  收藏  举报