这是我的代码,不知道为什么一直出现awk: 1: unexpected character '.' ,我寻思我的目标文档里面也没有.啊
#!/bin/bash
awk -F '{print $1}' Part.csv>1.txt
PARTNUMBER=$(cat ./1.txt)
for line in $PARTNUMBER
do
awk -F "," '{if($1~/^$line/) print $1,$2,$3}' Part.csv>10.txt
done
sed 's/-//' 1.txt>2.txt
PARTNUMBER2=$(cat ./2.txt)
for line2 in $PARTNUMBER2
do
awk -F "," '{if($1~/^$line2/) print $1,$2}' MFPart.csv>10.txt
done
cat 10.txt