在gawk中 使用shell腳本中的變量

function old_to_new
{
        oldSource1=$1
        oldSource2=$2
        resultLine=`awk -v source1="$oldSource1" -v source2="$oldSource2" '{if($1 == source1 && $2 == source2)print $0}'`
        source1=`echo $resultLine | gawk '{print $8}'`
        source2=`echo $resultLine | gawk '{print $9}'`
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章