3 Replies Latest reply on Jul 17, 2014 10:46 PM by Vivek12-Oracle

    How to search a pattern in a file and loop


           I have a csv config file:

      HLR, /data/hlr1.csv

      HLR, /data/hlr2.csv

      PCMR, /data/pcmr.csv


      XYZ, /pkg/xyz4.csv


      I have a shell script which will be passed a parameter. This parameter I need to lookup in the first field of the cofig file and display the corresponding second field in the config file. For example if the parameter passed to shell script is HLR I need to lookup the config file and should retrieve: