Re: An appropriate directory search tool?
- Date: Sun, 21 Oct 2018 13:11:16 -0400
- From: rhkramer@xxxxxxxxx
- Subject: Re: An appropriate directory search tool?
On Sunday, October 21, 2018 12:35:04 PM David Wright wrote:
> On Sun 21 Oct 2018 at 11:45:49 (-0400), rhkramer@xxxxxxxxx wrote:
> > Any further clarification / clues would be appreciated.
> Use neither option to see the difference with using either -l or -L.
> So that standard output doesn't clutter the output, I suggest
> redirecting it thus:
> $ grep test - >| /tmp/a ; echo "and the output is" ; cat /tmp/a
> Then you will see the difference when you add -l as an option.
Ok, thanks again, to you and Curt!
I see the difference, but it may take a little while for it to really soak in
(and / or to recognize a use / need for it (for me)), but I guess I learned
It sort of looks like that, with the -l option, if there were additonal files
that also had matches, I might have to restart the command to find others, but,
I'm not sure of that, and I guess I'd have to run a more extensive test to
confirm that, like creating at least two files with matches and put them in a
directory (probably with some other files that don't match).
I'm not ready to do that at the moment, so I'll leave it there for now.
(And, I doubt there's a way to run the same command using standard input twice
(e.g., something like grep test - - ...).)
For anyone else who is interested, my tests are shown below:
rhk@s19:/rhk/ked1$ grep test - >| /tmp/a ; echo "and the output is" ; cat
rhk@s19:/rhk/ked1$ less /tmp/a
rhk@s19:/rhk/ked1$ grep -l test - >| /tmp/a ; echo "and the output is" ; cat
and the output is
rhk@s19:/rhk/ked1$ grep -L test - >| /tmp/a ; echo "and the output is" ; cat
and the output is