I am reviewing a shell script and found this lines :
DIR=/home/bot/REP_INV/
LIST=/root/ListeTRI.txt
...
ligne=`cat $LIST`
for i in $ligne
do
/bin/cp $DIR*$i* /root/$i/InvExt/
/bin/cp $DIR*${i,,}* /root/$i/InvExt/
done
In the DIR folder I have a large number of file and in the LIST file I have code to sort those files. The goal is to sort the files into other folders.
I understand that the first copy command should copy files from DIR to the right folder in /root/ depending on the name of the file (it should have the code from the LIST in its name)
But I have no clue for the purpose of this second copy command. Does anyone know that syntax ${i,,} in /bin/cp $DIR*${i,,}* /root/$i/InvExt/
?