Sunday, June 19, 2022

The Unix Treasure Trove - Tips to Boost Productivity

Finally, instead of having stuff scattered all over, let's put them in one single post.

How can you get the man page you just displayed to persist after you're done (as in, you do $ man command and, after you press q, the screen has only "man command" left.) What if you want to see what were seeing a moment ago to be able to use it in the next command?

Ans : man command | less -X

More to follow as the cleanup continues.

Who are the unix tips superstars : Julia Evans needs a mention for sure. One of the densest (in a good way - meaning there's a lot of useful stuff for the real-estate consumed - unlike the TSTS blog 😊) (shellcheck - a linter, The difference between VARIABLE=2 and VARIABLE= 2 (with a space, in the second case, you assign '' (empty string) to VARIABLE and then try to run a command named 2. 
 
In Vim, how do you quickly fix indentation in the entire file? Enter command mode (as opposed to insert mode) and do : gg=G and you're done!



No comments: