This other answer states your
$PATH is invalid, but I disagree.
That's because, in
bash at least, it won't cause any errors - either when you set it, or when the shell tries to resolve a command via $PATH.
In $PATH, an asterisk means a literal
That is, there is NO wildcard expansion performed, and it is actually checking the literal directory
/home/admin*, which doesn't exist so it skips it, and it checks
*/bin, which is also similarly ignored.
You can create directories with a literal
* in them (but... but... why?).
And, if done, then it will look there; eg, in the
So, this would actually work with your given $PATH value:
echo 'echo Hello from \"star\"/bin' > \*/bin/asterisk.bash
chmod 744 \*/bin/asterisk.bash
(If you want to try it out in a local directory instead of root, just don't
(Not that I recommend doing this at home. Do it at a friend's house :-)
But since you probably did it anyway -- well, to get rid of the ridiculousness, the following three commands should do it.
(NB: I am not using
rm -r just in case something gets mistyped or the shell you're in interprets things differently.)