Dear
Can you please elaborate your answer ???? If I want to hold other column values of same row,How can I do it ???E.g. In above csv file, if I want to hold 6.6.6. and sometext_9.9.9, HOw can I do it ????
The awk command searches for a record whose first field ($1) matches the variable value supplied (variable what containing ProdId_A ). For each such record, the split function is used to get, e.g., 9.9.9 from sometext_9.9.9 . This combination (field 2 and the value from the last operation) is stored in the variable a . This is printed at the end of the file to emulate searching the first record from the bottom of the file.
Hey friend,
Thank u very much !!! the problem is I am not able to assign the value of "a" to any variable neither "a" is accessible outside the END block.
And got this output. If I understood correctly what you want, otherwise you'll have to explain it better. However if the file is very large these shell commands will be very slow, and in this case I suggest to use/adapt the awk approach presented earlier in this thread.