I want to write a shell script, that reads a file and use the columns of that file as input for a perl script. The perl script is going through files (number1, number2), pulls out the ID and write those to a new file. The perl script is working fine if I use it with the command line, however, my question is how I write a shell script to use the variables in my input_file for the perl script.
My input_file looks like
number1 ID1
number2 ID2
And I use the following shell script (which is not working, so please help with this)
#!/bin/bash
input_file="$1"
while IFS=" " read -r number ID
do
perl extract.pl $ID $number.ext > $number_ID.ext
done < "$1"