I have this code :
for file in "$@"*png; do echo "$file" done
It works only if you provide a path that ends with / like
What would be the correct way to add / to the path input, in situations like this, without breaking my script?
If you give a path input without / at the end, it just does this :
If I modify it to be
for file in "$@"/*png; do and input
/root/test/ it works but the result looks ugly :