3 Replies Latest reply: Jul 17, 2014 5:46 PM by Vivek12-Oracle RSS

    How to search a pattern in a file and loop

    user10566312

           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:

      /data/hlr1.csv

      /data/hlr2.csv