I have two sample files like this:
$ cat file1.txt
abc,sachin
cat,kumar
$ cat file2.txt
xyz
pressure
$ cat file3
xyz,sachin
pressure, kumar
I want the first column of file1file1 to be replaced with file2file2.
I tried usingdoing something like this:
$ awk 'FNR==NR{a[NR]=$3;next}{$2=a[FNR]}1' file1 file2
I amI'm using solarisSolaris 10 and it didntdidn't appear to support me anythis. Any other suggestions ??