Re: puTTy help
- From: comphelp@xxxxxxxxx (Todd H.)
- Date: 25 Oct 2006 11:46:47 -0500
"fnibogey" <finbogey@xxxxxxxx> writes:
Todd H. wrote:[snip]
"fnibogey" <finbogey@xxxxxxxx> writes:
Please help a total noob. I'm using puTty to access a linux server. I
grep strings from compressed directories. I would then like to be able
to search those results on my puTTy screen. Is this possible?
Yes, but it's neither an ssh or putty question really. It's more of a
unix shell question. But try this:
$ strings bigdirectoryiwannagrep/* | grep myfavoritegrepstring |
less
Thanks Todd, I'll try these.
So I take it there is no way to actually search these results of a grep
short of outputting it to a text file and searching that?
I think the concept you may be missing is what a the pipe (|)
character does. It obviates the need to put output into a disk file
and handles things "on the fly" if you will.
The command above looks for strings in all files in
bigdirctoryiwannagrp, pipes the standard output (stdout) to the grep
function which searches among those string for lines that match
myfavoritegrepstring, and then pipes that to a program that allows you
to page through the output (which is very handy if you get more than a
screen full of output).
The guy next to me uses a Mac and his terminal program lets him search
the screen. It would save a few steps.
Interest--didn't know it had that feature. That would be a client
side way of doing it, but what if the terminal program has a
scrollback buffer set to something smaller than the output you've
created? You may miss something. That's why it's better to handle
the output yourself, in my opinion.
However, there's another command line program that'll do what you
want.
$ screen
It can search it's history, but I've never had occasion to do that.
Not the answer you wanted, but some ideas anyway.
Best Regards,
--
Todd H.
http://www.toddh.net/
.
- References:
- puTTy help
- From: fnibogey
- Re: puTTy help
- From: Todd H.
- Re: puTTy help
- From: fnibogey
- puTTy help
- Prev by Date: Re: puTTy help
- Next by Date: Re: Tectia SSH File Transfer
- Previous by thread: Re: puTTy help
- Next by thread: how to connect to a server outside of network
- Index(es):
Relevant Pages
|
|