'Find' command not behaving in a script
I'm trying to make an extremely simple script named 'findm' in my /usr/local/bin that looks like this:
Code:
#!/bin/bash The problem I'm having is that this script only works when I'm in my top most home directory. Any directory lower than that and the script returns no results. Any help would be appreciated. Thanks. |
Quote:
I am wondering why it works at all. Since you want the parameter to expand you should use "double-quotes" instead of single quotes. Code:
#!/bin/bash |
Thanks very much. That small oversight makes it work perfectly. Regarding single quotes, that is how I always executed it as a straight command in the shell.
Code:
find -mindepth 1 -iname '*something*' |
All times are GMT -5. The time now is 03:27 PM. |