Handy ZSH hack
You know you can abuse cat and do something like:
cat file.txt
to print the file to terminal.
Probably you've used:
less file.txt
or
more file.txt
You probably also know that you can redirect a file to a command, for example:
mysql -ume -p < migration.sql
Turns out ZSH can do something like:
< file.txt
it's smart enough to view the file in a pager if it's too long to be printed in your terminal.
This doesn't work in Bash.
Written by Łukasz Korecki
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#