case statement needs fixing
Ray Parrish wrote:
> I have the following code
> while read ThisLine; do
> case "$ThisLine" in
> URLs="$URLs $ThisLine";;
> done < "$MapName"
> echo "URLs $URLs"
> $MapName is assigned the name of a google site map file. I've tried
> several variations to match the
> <loc>http://www.somesite.com/index.html</loc> lines in the file so I can
> concatenate them into one long string.
> Still echo keeps dumping an empty string back at me, so I'm not sure
> what I am doing wrong with this one.
> Does anyone know why this is not working?
> Thanks, Ray Parrish
I figured it out, here is the corrected code -
while read ThisLine; do
case "$ThisLine" in
done < "$MapName"
echo "URLs $URLs"
I had to escape the <> symbols.
Later, Ray Parrish
The Future of Technology.
Ray's Links, a variety of links to usefull things, and articles by Ray.
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users