当前位置: 技术问答>linux和unix
帮我看看一个脚本啊。。。
来源: 互联网 发布时间:2016-11-18
本文导语: cat $myfiletable|grep -v "^/QSYS.LIB/.*.LIB/"| awk -F: '{ if($4~/ignore/) {printf "#keep %sn",$1} else if ($4~/^call=/) {printf "myPrompt "uninstalling %s"n%s >>uninstall.log 2>&1 && myOK || myFailn", $1,substr($4,6)} else {...
cat $myfiletable|grep -v "^/QSYS.LIB/.*.LIB/"|
awk -F: '{
if($4~/ignore/) {printf "#keep %sn",$1}
else if ($4~/^call=/) {printf "myPrompt "uninstalling %s"n%s >>uninstall.log 2>&1 && myOK || myFailn", $1,substr($4,6)}
else {printf "myPrompt "uninstalling %s"nrm -f $DESTPATH/47%s47 >>uninstall.log 2>&1 && myOK || myFailncp -pf $BAKPATH/47%s47 $DESTPATH/47%s47 >>install.log 2>&1 && myOK || myFailn", $1,$1,$1,$1}
}' >>$myuninstall
这段脚本老报语法错误啊??看不出来啊。。
awk -F: '{
if($4~/ignore/) {printf "#keep %sn",$1}
else if ($4~/^call=/) {printf "myPrompt "uninstalling %s"n%s >>uninstall.log 2>&1 && myOK || myFailn", $1,substr($4,6)}
else {printf "myPrompt "uninstalling %s"nrm -f $DESTPATH/47%s47 >>uninstall.log 2>&1 && myOK || myFailncp -pf $BAKPATH/47%s47 $DESTPATH/47%s47 >>install.log 2>&1 && myOK || myFailn", $1,$1,$1,$1}
}' >>$myuninstall
这段脚本老报语法错误啊??看不出来啊。。
|
一般来说,续行符与下一行之间,只有一个换行符,不能存在空白符。
检查下
检查下