bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to expand quoted/escaped wildcards?


From: Leniks
Subject: How to expand quoted/escaped wildcards?
Date: Sun, 29 Mar 2009 18:55:55 -0700 (PDT)

Problem: expand quoted wildcards with space:

# find .
.
./dir 2
./dir 2/rcs
./dir 2/startup.lst
./dir1
./dir1/rcs
./dir1/startup.lst
./rcs
./startup.lst

# a="dir1/*"

# echo $a
dir1/rcs dir1/startup.lst

# echo "$a"
dir1/*

# b="dir 2/*"

# echo $b
dir 2/*

# echo "$b"
dir 2/*

# eval "echo \"$b\""
dir 2/*


What I want is expand $b to an bash array variable of { "dir 2/rcs", "dir
2/startup.lst" }, is it possible?

Thanks very much for any help.

-- 
View this message in context: 
http://www.nabble.com/How-to-expand-quoted-escaped-wildcards--tp22775144p22775144.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]