Get file name in shell scrip loop: bad substitution
Hi guys. Good day, morning, afternoon or night, depending on where you live.
I have a script shell in which I am looping on files (absolute path) see code section above.
I always have an error: bad substitution.
Is it because my variable file is the index of the loop and not a normal string?
for file in $home/$input/*.txt
I specify that I need to loop on the absolute path, as I do not want to go inside the files folder, as I am running the script from a bin folder and want to stay in there.