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