Re: pathname expansion part two

2010-10-15 Thread Davide Brini
On Fri, 15 Oct 2010 11:33:45 -0800 Ken Irving wrote: > Note, though, that the '*' will still be there if the glob operation > fails to expand to anything. > > $ echo foo /usrz* > foo /usrz* > > I guess this makes sense, since just about all characters can be used in > filenames, but I alwa

Re: pathname expansion part two

2010-10-15 Thread Ken Irving
On Fri, Oct 15, 2010 at 01:13:33PM -0600, Bob Proulx wrote: > javajo91 wrote: > > "For example, if you wanted to list all of the files in the directories /usr > > and usr2, you could type ls /usr*. > > Because the '*' is a file glob. It is called a glob because it > matches a glob of characters.

Re: pathname expansion part two

2010-10-15 Thread Bob Proulx
javajo91 wrote: > "For example, if you wanted to list all of the files in the directories /usr > and usr2, you could type ls /usr*. Because the '*' is a file glob. It is called a glob because it matches a glob of characters. The process of the expansion is called globbing. "/usr*" matches "/usr

Re: pathname expansion part two

2010-10-15 Thread Greg Wooledge
On Fri, Oct 15, 2010 at 12:01:11PM -0700, javajo91 wrote: > "For example, if you wanted to list all of the files in the directories /usr > and usr2, you could type ls /usr*. If you were only interested in the files > beginning with the letters b and e in these directories, you could type ls > /usr

pathname expansion part two

2010-10-15 Thread javajo91
Reading "Learning the bash shell" and came across a passage that i simply cannot get to work: "For example, if you wanted to list all of the files in the directories /usr and usr2, you could type ls /usr*. If you were only interested in the files beginning with the letters b and e in these direc

Re: Question regarding pathname expansion

2010-10-15 Thread javajo91
Oops - never mind. I see my error. ls /usr* will list all files within usr & usr2 directories. the / is needed to specify the files within. Thank you! javajo91 wrote: > > Morning - > > I'm reading "Learning the bash Shell" by Newham & Rosenblatt and have a > question regarding pathname e

Question regarding pathname expansion

2010-10-15 Thread javajo91
Morning - I'm reading "Learning the bash Shell" by Newham & Rosenblatt and have a question regarding pathname expansion and wildcards. They mention that wildcards can be used as part of a pathname. The example they give is that if you wanted to list all the files in the /usr & /usr2 directories