× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks, Scott!

Even though I've run into this several times, I forget it and need to be
reminded.  The shell expands everything.  The shell expands everything.
The shell expands everything (unless it's in quotes).

Joe

> From: Scott Klement
> 
> For example, DON'T do the following:
> 
>       find /mydir -name *.txt
> 
> because QShell will expand *.txt into a list of files, and what the
FIND
> utility will actually see will be the following:
> 
>       find /mydir -name file1.txt file2.txt file3.txt
> 
> That's a problem, because find will think that "file2.txt" is another
> switch that you're wanting to pass to it, and it doesn't know how to
deal
> with a swtich called "file2.txt" so it will return an error.
> 
> On the other hand, DO do it this way:
> 
>      find /mydir -name '*.txt'
> 
> The single quotes tell QShell not to do any special processing for the
> characters in the quotes.  That way, the FIND utilty will actually
receive
> the characters '*.txt' as the argument to the -name switch, and will
know
> how to deal with it.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.