The section "Path Search" of 'man sh' explains what the PATH variable is for:

When locating a command, the shell first looks to see if it has a shell function by that name. Then it looks for a builtin command by that name. If a builtin command is not found, one of two things happen: 1. Command names containing a slash are simply executed without performing any searches. 2. The shell searches each entry in PATH in turn for the command. The value of the PATH variable should be a series of entries separated by colons. Each entry consists of a directory name. The current directory may be indicated implicitly by an empty directory name, or explicitly by a single period.

Executing '/home/$USER/icecat/icecat' (or simply '~/icecat/icecat') works too: it is the first "thing" in the excerpt I quoted above. But it is faster to only type 'icecat', what requires an file named "icecat" in one of the directory listed in $PATH.

Reply via email to