I have written this little script to find executables that are passed as arguments e.g.
./testexec du ls md
How do I get the script to not out
Just redirect the error message (coming from stderr) into /dev/null:
stderr
/dev/null
which $filename 2>/dev/null