Could you please try following. You are using double quotes "fileA"
which makes it string and will be considered as output file name as fileA(NOT as a variable fileA
) where output should be written, rather than use variable name named fileA
like > (fileA)
.
gawk -v "fileA"="testA" '$1<5{print $1 > (fileA)}' data
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…