pipe a program into less

8,667

Piping only redirects stdout. If you want stderr as well then you need to redirect that to stdout first.

git config 2>&1 | less
Share:
8,667

Related videos on Youtube

coderdave
Author by

coderdave

Professional console game developer

Updated on September 17, 2022

Comments

  • coderdave
    coderdave over 1 year

    I'm taking the dive into setting up and learning git and at the same time learning bash. I'm trying to do something simple as view the help section of

    $ git config
    

    unfortunately, when I type that the output of the help goes off the screen. Doing some googling I found less to be the program I want to use to scroll.

    I tried

    $ git config | less
    

    with no success. Any ideas? Thanks!