My first Bash script : trouble with *
From: Vincent Schmid (mightberead_at_econophone.ch)
Date: Tue, 12 Apr 2005 22:35:39 +0200
Trying to write my first script with bash, I have declared a variable
which holds a path :
declare -r SOURCE_PATH=/home/source
Now, I want to know wether /home/source is empty or not. It seems that
something like test -e /home/source/* would work...
In order to concatenate /* to my path, I declare a variable ANY_FILE
like this :
Now I test the result :
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.
Some help would be appreciated,