Posts

[AWK] Explaining NR==FNR

Introduction Sometimes you might see the phrase NR==FNR in an awk command. Actually this is a common idiom we used in awk. NR and FNR are two built-in variables in …

comm command by examples

comm is a useful command for us to compare two sorted files line by line. It can be used in multiple scenarios. Before getting into the use cases, let’s understand …

Bash: Hide user input/password

Sometimes we may need to hide the user input so that they won’t be shown in the terminal. This is especially useful when our script requires a password from users. …