Usually in Bash scripting, we define a variable by giving it a name. and reference it later by using that name in the form of ‘${variable_name}’. This is the usual use case. However, there is another unusual use case. The… Read More
the EDITOR and VISUAL environment variables
I installed a Debian Linux OS today, but found that the default text editor is nano, which I am not familiar with. After searching how to set text editor using google, I got the solution. Two environment variables can be… Read More
boilerplate code for Linux getopt
Linux getopt command is often used to parse script options. I find a piece of boilerplate code for this command and mark it in this post for further reference. set -eu set +e options=$(getopt –name “demo.sh” -o “f:d” -l “file:,debug”… Read More
bash command history
Yesterday morning after arriving at the office, I booted up my laptop as usual and tried to connect to my Linux development server using putty. However, the ssh connection couldn’t be established successfully. After struggling for a while, I found… Read More