• Emerald@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    10 hours ago

    i was doing cat ~/.bash_history | grep thing which is stupid so i started doing grep "thing" ~/.bash_history

    now you’re telling me i should do history | grep thing

    i can’t win

    • qjkxbmwvz@startrek.website
      link
      fedilink
      arrow-up
      7
      ·
      10 hours ago

      Some would call the former command cat abuse.

      In short, unless you want the contents of a file printed to stdout (or multiple files concatenated), the command can probably be written without cat, instead using the filename as an argument (grep pattern file) or IO redirection (cmd < file).

      Stylistics and readability are another thing though.