Let's say, I have the following structure:
/usr/bin/app
/home/me/bin/app
And $/usr/bin/app --version
--> v1
, $/home/me/bin/app --version
--> v2
.
So, when I execute some command, say $app --version
, it returns v1
, but my $which app
gives me /home/me/bin/app
, so, as I think, it must execute the second app, and return v2
. Why doesn't it happen?
In other words does the construction $app
equivivalent to $$(which app)
, and for which reason it doesn't apply ?
hash -d app
and add your app againaccept
it.