Re: Avoiding pattern expansion in bash?
On Sun, Oct 10, 2004 at 05:11:21AM +0200, Olle Eriksson wrote:
> This might be a little off topic but here it goes anyway.
>
> I am writing a bash script that takes as input a file expression such as
> "/etc/lilo.conf" or "/boot/config*" etc. I want to keep those strings as
Instead of "/etc/lilo.conf*" try "/etc/lilo.conf\*"
> they are (including the *) and echo them to a file. How do I prevent bash
> from doing its pattern expansion where it turns /boot/config* into a list
> of files that match the expression.
>
> If I use echo "$1" it becomes the first file that matches the
> expression /boot/config*. If I use echo "$*" it becomes a space separated
> list of all the files that match the expression. I want none of this.
>
> Any ideas?
>
> Regards
> Olle Eriksson
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
>
--
Paul E Condon
pecondon@mesanetworks.net
Reply to: