Newbie questions

D

Daniel Carrera

man <some_page> | col -b | less

man <some_page> | col -b | grep "something"

man <some_page> | col -b > ~/my_manpage



Yes, exactly. That's what I was saying. You can already do
redirections and pipes with "man" so there's no point in making "man"
send its output to stdout.
 
G

Gennady

Yes, exactly. That's what I was saying. You can already do
redirections and pipes with "man" so there's no point in making "man"
send its output to stdout.

That's exactly what "man" is doing here -- sending its output to
stdout. Stdout being a tty device is a special case for "man" -- in
this case it invokes PAGER command and redirects its own stdout to the
command's stdin through the pipe.

Sincerely,
Gennady Bystritsky
 
D

Dave Thomas

I see no reason why this wouldn't be a good thing. If you're
writing to the console, invoke a pager.

Your wish... I've added it here, so it'll be in the next commit.

Cheers

Dave
 
D

Dave Thomas

but anything that supports
paging should use the PAGER variable. I only know about them because I
always reset mine to 'less' instead of 'more'.
...
I've also written some scripts which use these variables. It's pretty
easy.

So says the man who hasn't looked at the perldoc source... ;)

It actually isn't quite as simple as it might be: the lack of decent
pipe support under Windows means I'm going to have to go through a
temporary file, which is kind of ugly. Perhaps someone might want to
look at tidying it all up later on. In the meantime, it works... :)


Cheers

Dave
 
L

Luke A. Kanies

So says the man who hasn't looked at the perldoc source... ;)

It actually isn't quite as simple as it might be: the lack of decent
pipe support under Windows means I'm going to have to go through a
temporary file, which is kind of ugly. Perhaps someone might want to
look at tidying it all up later on. In the meantime, it works... :)

Hey now, I think I included an "on Unix" disclaimer somewhere, although it
may have been in a different email. :) Given my total lack of Windows
programming experience, I would not claim to understand those
complexities.

I agree that temp files are ugly; it always amazes me that so many
programmers have not discovered this.

Luke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,364
Latest member
Stevanida

Latest Threads

Top