Re: Command line assistance needed
- From: "Chris F.A. Johnson" <cfajohnson@xxxxxxxxx>
- Date: Sun, 16 Jul 2006 20:45:23 -0400
On 2006-07-17, Øyvind Røtvold wrote:
"Chris F.A. Johnson" <cfajohnson@xxxxxxxxx> writes:
On 2006-07-16, ~David~ wrote:[ snip ]
cat filenames* | grep string-here
UUOC (useless use of cat).
No it isn't, filenames* may be more than one file, in which case cat
will conCATenate them, as it is supposed to.
You can use multiple filenames as arguments to grep; cat is NOT
necessary. The only use cat would have is to prevent grep from
showing filenames, and you don't need cat for that (grep -h).
(Not to mention that the OP *wanted* the filenames.)
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
.
- References:
- Re: Command line assistance needed
- From: Øyvind Røtvold
- Re: Command line assistance needed
- Prev by Date: Re: Command line assistance needed
- Next by Date: newbie question: disabling the write behind cache
- Previous by thread: Re: Command line assistance needed
- Next by thread: disabling certain users from receiving external e-mail messages
- Index(es):
Relevant Pages
|