Hi Team,
As i'm new to the shell scripting, i stuck in a place to replace a column valuein a file when compared with other file. Could you please help me to work on this?
I have 2 files test1.csv and test2.csv. I need to replace empdep column in test1.csv if it has the value as "sign*". I have second file test2.csv which have the value need to replace that" sign*".
Note : I'm using ksh and test1.csv have around 2,048,576 rows and test2.csv have 10000 rows
test1.csv
empname,place,empdep
aaaa ,city1,001
bbbb,city2,sign-1
dddd,city1,005
ffff,city5,sign-2
hhhh,city7,sign-1
test2.csv
empname ,new
aaaa ,001
bbbb,002
cccc,003
dddd ,005
eeee,006
ffff,007
gggg,008
hhhh,009
Expected Result:
empname,place,empdep
aaaa ,city1,001
bbbb,city2,002
dddd,city1,005
ffff,city5,007
hhhh,city7,009