1. 使用cat命令讀取文件:cat filename
2. 使用while循環讀取每一行:while read line; do
3. 使用awk命令獲取每一列:awk -F "," '{print $1,$2,$3}'
4. 使用if語句作為條件:if [ $1 -eq 1 ] && [ $2 -eq 2 ] && [ $3 -eq 3 ]; then
5. 執行相應的操作:echo "Condition is true"
6. 結束while循環:done < filename
1. 使用cat命令讀取文件:cat filename
2. 使用while循環讀取每一行:while read line; do
3. 使用awk命令獲取每一列:awk -F "," '{print $1,$2,$3}'
4. 使用if語句作為條件:if [ $1 -eq 1 ] && [ $2 -eq 2 ] && [ $3 -eq 3 ]; then
5. 執行相應的操作:echo "Condition is true"
6. 結束while循環:done < filename
公眾號:1024技術圈
?? 提供互聯網知識和資訊,分享IT前沿技術,熱門資源,大廠面試題 ??