I'm new to AWK, need help on below. I have below code to print 9th column value in CSV when false. The 9th column having 7 lines but its printing only the first line. Can someone tell me how to print complete 9th column value?
It is printin only "Test failed: text expected to equal /
FILES=$*
for f in $FILES
do
echo "${f##*/}"
echo "------------------------------------------------"
awk -F "," 'BEGIN{print $f} $8 == "false" {print $9}' $f
echo
done
My input CSV:
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Conne$
1583830716746,1202,HTTP Request- Authorization TC01,200,OK,ZH 1-1,text,true,,530,354,1,1,1202,0,1124
1583830717967,59,ID_001_Wrong_PNR,500,Internal Error,ZH 1-1,text,false,"Test failed: text expected to equal /
****** received : [[[
{
""status"": ""500"",
""code"": ""500"",
...]]]
****** comparison: [[[{""seatReservations"":[{""passengerKey"":""PAX1"",""success"":""false"",""seatCode"":""50C"",""segmentKey"":""SEG1"",""...]]]
/",322,1023,1,1,58,0,0
output getting:
"Test failed: text expected to equal /
Expected output:
"Test failed: text expected to equal /
****** received : [[[
{
""status"": ""500"",
""code"": ""500"",
...]]]
****** comparison: [[[{""seatReservations"":[{""passengerKey"":""PAX1"",""success"":""false"",""seatCode"":""50C"",""segmentKey"":""SEG1"",""...]]]
/"