|
At last...something I can blame for my ever increasing girth...it's not me, it's the shell! > -------- Original Message -------- > Subject: RE: QSHELL question for find command > From: "Joe Pluta" <joepluta@xxxxxxxxxxxxxxxxx> > Date: Thu, February 10, 2005 8:33 am > To: "'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx> > > 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. > > -- > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.