shell 文件 占位符:

 

#!/bin/bash
ssd=/Users/alex/ssd.txt
now_env_sn=`cat /Users/alex/a.txt`
#遍历文件
cat $ssd | while read line
do
#判断是否是子字符串
if [[ $now_env_sn  =~ $line ]]
# 冒号用作了占位符
# if command; then :; else ...; fi
then : 
else
   echo $line is kongxian de sn
fi
done

  

posted @ 2021-04-01 16:48  峡谷恶霸  阅读(1218)  评论(0编辑  收藏  举报