I am using it inside docker bind mount and it giving different result.
>Solution :
PWD , pwd , ${PWD} , ${pwd} , $(PWD) , $(pwd)
I assume that you are typing the above at a shell prompt.
PWDis the name of a non-existent command. That fails with "command not found".pwdis the name of a shell builtin command. That outputs the current directory.${PWD}expands to the value of thePWDshell variable which contains the pathname of the current directory. It then attempts to execute it which fails because a directory is not executable.${pwd}expands a non-existent shell variable. That gives an empty string and is ignored.$(PWD)attempts to get the output from runningPWD, and run that as a command. It fails because thePWDcommand does not exist.$(pwd)runs the existing commandpwd. Then it takes the output of that and attempts to run it as a command. It fails because the output is a directory pathname, and directories are not executable.