bash - AWK, delete record when field match -
i use regular file has 2 fields, 1st account name (with spaces) , 2nd integer number, both fields separated \t
, records separated \n
. problem need delete records match 1st field string. code below:
awk -v apenom="$apeynom" -f "\t" ' $1 != apenom { print $0; } ' $1 > $temp_file_2
it works records not first record, never matches first field first record?
try changing script to:
'$1 != apenom { print $0; next } { print "mismatch[", $1, "]" }'
i have feeling have dirty input. there might space before separating tab character or something. have print out $1
when skipping.