👤
Home Man
Search
Today's Posts
Register


Replacing first field of file2 with the second filed of file1 for matching cases

Shell Programming and Scripting




Kindly Note - This is a Single User Post by Forum Member Don Cragun Regarding:
Replacing first field of file2 with the second filed of file1 for matching cases.
Please Follow The Primary Link Above to View the Full Discussion.

Old 11-06-2014
I misread what you were trying to do. To get the output you wanted using my suggestion, you'd need to change the line:
Code:
	$2 = x[$1]

to:
Code:
	$1 = x[$1]

In the future, please show us a sample of the output you're trying to produce as well as samples of your input files.