first of all, what can i do to make my command works like the "ls, cp, mv" ?
I always do vi myScript.sh and then chmod +x myScript.sh and I have to execute it like ./myScript.sh ,,, simply typing $myScript at the command promp will not work.
Second question for shell scripting:
I am trying to search whatever the argument is within only the user path... did I do this correctly? Thanks
PATH=/bin:/usr/bin/:sbin/.
for command in PATH
do
grep "$1"
done
my ideal output would be
> search ls
>/bin/ls something like that