I would like to run a command in a bash script according to the following code sample. Despite the fact that j and i variables contain the filenames (these filenames were read out from the samples.list.txt), these strings can't be inserted into the command. What could be wrong? Many thanks!
cat work/sample.list.txt | while read line;
do
arrIN=(${line// / })
i=${arrIN[0]}
j=${arrIN[1]}
k=${arrIN[2]}
java -jar some.jar ./input1directory/"$i" ./input2directory/"$j"
done
sample.list.txtcontents?arrIn=($line)?bash -x ./yourscript.shand post here the output. Thanks