I've got a file CATALOG.dat containing lines like the following:
event_017_3916.gz
I need to extract the first number of this line (017). This number is necessary to launch another program (PROGRAM.C), which requires input numbers to start (i.e., it should be used like $ PROGRAM.C 017). Actually, I just need to build up a command like:
PROGRAM.C 017
inside my shell script. My problem is: how do I read the 017 and set it as a variable that I can use to build up the command? Thanks a lot for you help!