I have a CSV file that contain Null value in the 3rd column. I need to update this column with the hash of the second column.
Here a sample code:
#!/bin/bash
declare key='ABCDEFGHIJKLMNOP123456'
awk -F"," '{$3 = $2"$key";print}' C:/test.csv > C:/output.csv
and here my sample CSV
A,B,?
B,D,?
F,jk,?
the output of my code is not correct and i didn't get Key value but Key variable name
A,B,key
B,D,key
F,jk,key
Can you please help to concat key value with the second column then apply a hash (md5 for example )
Main question is how to apply Hash within AWK.
thanks in advance