Hi!
I have the following sample file:
VE_ORINOCO_FULL 100 99.9921875
VE_ORINOCO_FULL 2264 11.609375
VE_SINCOR_3_2004 4000 967.296875
VE_SINCOR_SED_3D 740 273.039063
XX_AO_TEST 110 42.8203125
XX_BODATALOAD 110 37.1640625
XX_CUTOFF_LD 126 2.3671875
XX_CUTOFF_TEST 110 90.296875
XX_FLOUNDER 100 87.1640625
XX_FLOUNDER 300 185.320313
XX_FLOUNDER_TRAIN 150 123.25
I would like to make a script with the name in the first column as argument then to search for all the lines that match that name EXACTLY and add the value of the second column.
For instance: script XX_FLOUNDER < inputfile would return in the above case: 400.
Many thanks,
I have the following sample file:
VE_ORINOCO_FULL 100 99.9921875
VE_ORINOCO_FULL 2264 11.609375
VE_SINCOR_3_2004 4000 967.296875
VE_SINCOR_SED_3D 740 273.039063
XX_AO_TEST 110 42.8203125
XX_BODATALOAD 110 37.1640625
XX_CUTOFF_LD 126 2.3671875
XX_CUTOFF_TEST 110 90.296875
XX_FLOUNDER 100 87.1640625
XX_FLOUNDER 300 185.320313
XX_FLOUNDER_TRAIN 150 123.25
I would like to make a script with the name in the first column as argument then to search for all the lines that match that name EXACTLY and add the value of the second column.
For instance: script XX_FLOUNDER < inputfile would return in the above case: 400.
Many thanks,