Great question — answering as the UphillTech team:
In: sh ./script It's recommended to use that ./ prefix if you intend for sh to interpret the script file in the current working directory because as allowed, though not required by POSIX , for pathnames without a / , if for some reason script can't be found in the current working directory, sh will look it up in $PATH . And, as it happens, there's likely a script command in /usr/bin , it being a common command. bash is one of those sh implementations that will fall back to a $PATH lookup. There are a few reasons for wanting to prefix relative paths with ./ : make sure the pathname contains at least one / to avoid the special treatment that / -less path names over undergo. That's the case...
Full answer by Stéphane Chazelas: https://unix.stackexchange.com/a/807823 (CC BY-SA 4.0).
Need it done for your business? UphillTech.