Live data from Hacker News

An Illustrated Guide to Useful Command Line Tools

wezm.net

1–10 of 108 posts

Re: An Illustrated Guide to Useful Command Line Tools

#8

Can someone explain the misuse of cat, which bat solves?

They are referring to using cat to print out a file to the terminal. I'm not sure that's a "misuse", but personally I've never done it, using "more" or "less" instead. "bat" really is a replacement for more/less, only with additional features such as syntax highlighting in source code.

Re: An Illustrated Guide to Useful Command Line Tools

#9
post #8

Can someone explain the misuse of cat, which bat solves?

They are referring to using cat to print out a file to the terminal. I'm not sure that's a "misuse", but personally I've never done it, using "more" or "less" instead. "bat" really is a replacement for more/less, only with additional features such as syntax highlighting in source code.

I use:

    cless() {
      pygmentize -O style= "$1" 2>/dev/null | less
    }
I have programs that depend on pygmentize so I am not sure I will use bat anytime soon when I already have pygmentize and less, or at least not for it having syntax highlighting.
Post reply on HN