instead of this, you should put:
#!/bin/sh (for bash shell)
>#Script to search for a file given its filename as a parameter.
>if($1 == 0)
if [$1 == 0]; then
>print ' No arguments specified ';
echo "No arguments specified"
>find / '!' -type d -name $1 -print0
># End of Script
This should work (I hope!)
You can also look at this web page for bash scripts:
and for your permission denied problems, you can only avoid these problems by being root while executing your script, or change the permissions on all folders! There is no way out!
Hope this help! I am not an expert myself, but I am trying hard!