127 Return code from $?

Sachin Chourasiya picture Sachin Chourasiya · Nov 19, 2009 · Viewed 391.8k times · Source

What is the meaning of return value 127 from $? in UNIX.

Answer

Oldskool picture Oldskool · Nov 19, 2009

Value 127 is returned by /bin/sh when the given command is not found within your PATH system variable and it is not a built-in shell command. In other words, the system doesn't understand your command, because it doesn't know where to find the binary you're trying to call.