Comment

Comment by codesnik

if you prefer to use cat just to read your pipeline from left to right, you can just start your command with file redirection. It doesn't have to be at the end of the command.

  <file grep something | do something else ...
this works in bash too, but if you're using zsh, there're a couple of nice shortcuts

  <file
on it's own works as

  more file
and

  > file
  ...
  ...
  ^D
allows you to put something into the file quickly without firing up the editor. Though

  > file << end
  ...
  end
will give you nicer line editing experience.

more zsh redirection tricks here: https://zsh.sourceforge.io/Doc/Release/Redirection.html#Mult...

parent codesnik 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton