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

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM