related to this thread answer
if the input is A B.py C D.py, the output turns into A.py B.py C.py D.py
I want to implement this feature in another script given below:
#!/bin/bash
echo -n "Round Name:"
read round
mkdir $round
read -r -p "Enter the filenames:" -a arr
for filenames in "${arr[@]}"; do
cp ~/Documents/Library/Template.py $round/$filenames
done
How can i do that?
$FileExtcome from?AintoA.pyandCintoC.py? Is it simply a case of adding.pyif there isn't already a.pyon the end (so that eitherAorA.pyare mapped to the sameA.py)?