cheap nfl jerseys china cheap nfl jerseys free shipping wholesale nfl jerseys china wholesale jerseys from china cheap nfl jerseys free shipping cheap nfl jerseys for sale cheap jerseys free shipping wholesale nfl jerseys from china cheap nfl jerseys sale cheap nike nfl jerseys china wholesale jerseys free shipping cheap nfl jerseys wholesale wholesale nfl jerseys online cheap nfl jerseys wholesale china jerseys wholesale cheap coach handbags outlet authentic designer handbags cheap coach handbags outlet cheap coach purses outlet discount coach bags coach bags sale coach purse outlet cheap real coach purses coach handbags sale online coach purse outlet michael kors outlet online store cheap michael kors bags cheap michael kors purse michael kors factory outlet online cheap michael kors handbags cheap michael kors purses michael kors bags outlet online cheap michael kors purse michael kors handbags discount cheap michael kors purse michael kors handbags discount
cheap nfl jerseys china cheap nfl jerseys free shipping wholesale nfl jerseys china wholesale jerseys from china cheap nfl jerseys free shipping cheap nfl jerseys for sale cheap jerseys free shipping wholesale nfl jerseys from china cheap nfl jerseys sale cheap nike nfl jerseys china wholesale jerseys free shipping cheap nfl jerseys wholesale wholesale nfl jerseys online cheap nfl jerseys wholesale china jerseys wholesale cheap coach handbags outlet authentic designer handbags cheap coach handbags outlet cheap coach purses outlet discount coach bags coach bags sale coach purse outlet cheap real coach purses coach handbags sale online coach purse outlet michael kors outlet online store cheap michael kors bags cheap michael kors purse michael kors factory outlet online cheap michael kors handbags cheap michael kors purses michael kors bags outlet online cheap michael kors purse michael kors handbags discount cheap michael kors purse michael kors handbags discount
next up previous contents index
Next: The Question Mark Up: Wildcards Previous: Wildcards

What Really Happens?

Good question. Actually, there are a couple of special characters intercepted by the shell, bash . The character ``*'', an asterix, says ``replace this word with all the files that will fit this specification''. So, the command cp data* ~/backup, like the one above, gets changed to cp data-new data1 data2 data5 ~/backup before it gets run.

To illustrate this, let me introduce a new command, echo . echo is an extremely simple command; it echoes back, or prints out, any parameters. Thus:

screen5575

As you can see, the shell expands the wildcard and passes all of the files to the program you tell it to run. This raises an interesting question: what happens if there are no files that meet the wildcard specification? Try echo /rc/fr*og and see what happens...bash  will pass the wildcard specification verbatim to the program.

One word about that, though. Other shells, like tcsh , will, instead of just passing the wildcard verbatim, will reply No match.

screen5584

The last question you might want to know is what if I wanted to have data* echoed back at me, instead of the list of file names? Well, under both bash and tcsh, just include the string in quotes:

screen5591

OR

screen5597



Converted on:
Mon Apr 1 08:59:56 EST 1996