[plug] Simple bash scripting problem (again)

Richard Meyer meyerri at westnet.com.au
Mon Oct 10 20:21:37 WST 2005


On Mon, 2005-10-10 at 19:28 +0800, Timothy White wrote:
> Ok. So it's still not working! This time it's in a compare function!
> I'm almost ready to use perl!!!!
> Following examples from
> http://www.tech-recipes.com/bourne_shell_scripting_tips209.html and
> the 'info bash' pages...
> I have worked out that this is the syntax for what I want...
> if [ $var == "" ]
> then
>   echo variable is null
> fi
> 
> In my script it doesn't work!!
> 
> Thanks.
> Tim
> 

I've found out that the following find command does it

richard1 at Selous:~/project> cat test.sh
#!/bin/bash
        find . -name "$@" -print

If I may make a suggestion, try reading find with the "-exec" option and
see whether you can get it to do what you want


-- 
Richard Meyer <meyerri at westnet.com.au>
Cutting the space budget really restores my faith in humanity.  It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation.
                -- Johnny Hart

Linux Counter user #306629




More information about the plug mailing list