Re: My first Bash script : trouble with *

From: mjt (mjtobler_at_removethis_mail.ru)
Date: 04/12/05


Date: Tue, 12 Apr 2005 16:25:46 -0500


(Vincent Schmid <mightberead@econophone.ch>) scribbled:

> declare ANY_FILE='/*'
>
> ANY_FILE=$SOURCE_PATH$ANY_FILE
>
> Now I test the result :
>
> echo $ANY_FILE
>
> To my surprise, this last line gives the list of the files which are in
> /home/source ! I have tried many things to get this "*" to work
> correctly with no sucess.

... yep, you got what you asked for: * expands to
mean "all filenames" and that's what you got back.

take a look at the bash scripting guide:
http://www.tldp.org/LDP/abs/html/

-- 
<< http://michaeljtobler.homelinux.com (Beta Band, The - Won) >>
 Fry: That's it! You can only take my money for so long before you 
   take it all and I say enough! 


Relevant Pages