Fix bash script expecting path input with / at the end breaking when path doesn't end with / – unix.stackexchange.com

I have this code : for file in "$@"*png; do echo "$file" done It works only if you provide a path that ends with / like /root/. What would be the correct way to add / to the path input, in ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Fix bash script expecting path input with / at the end breaking when path doesn't end with / – unix.stackexchange.com"