Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^4: Output of a command

by gaal (Parson)
on Jul 30, 2008 at 06:05 UTC ( #701027=note: print w/replies, xml ) Need Help??

in reply to Re^3: Output of a command
in thread Output of a command

It's a pet peeve of mine for help text explicitly requested to go to stderr. If I asked for it, and it's long, please put it on stdout so I don't have to work harder to pipe it into $PAGER. Of course, if something's wrong and you need to give me an error message with some helpful text, it's fine to put it on stderr to lessen the chance of breaking my pipes.

Replies are listed 'Best First'.
Re^5: Output of a command
by Anomynous Monk (Scribe) on Jul 30, 2008 at 06:35 UTC
    Yeah. Help going to stderr also breaks the --help|less idiom.
      ... then frustratingly one invokes p --help 2>&1 | q (in a bourne like shell).

      Which is why you should use a better shell and just use --help |& less instead (and set up abbrevs so you can just type ,le SPC which expands into |& less for you . . . :).

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

        Actually, what I do for this stuff is set up the following in my .bashrc:

        # automatically keep output of commands in a logfile for immediate # subsequent inspection alias ll="$PAGER /tmp/last.log" l () { if [ "x$1" = "x" ] ; then echo "did you mean 'll'?" ; \ else /usr/bin/env " $@" 2>&1 | tee /tmp/last.log ; fi }

        l !! and then ll is less mental load for me.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://701027]
[ambrus]: what kind of restaurant?
[LanX]: with different specialized employees in different rooms
[LanX]: communication overhead calls for sensible management
[ambrus]: "different specialized employees in different rooms" => so, there's a cleaner guy who cleans up the vomit from the bathroom every morning?
[erix]: makes me think of MMM too (mythical man month): "adding more people to a project makes it slower"

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2017-09-22 13:45 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (264 votes). Check out past polls.