How to Increase Bash History Size

Posted on
Some valuable or complex commands may not be able to keep in your mind constantly when you need them. In this moment, you can leverage the command history to recall them. But as time goes by, you could lose them due to the size limitation of command history. The history always keep the most recent […]

How to Set Default Editor to Vi in KSH

Posted on
You might find out your shell does not respond to your esc + k which can reuse the historical commands in KSH just like ↑ in bash. This is because the default EDITOR in your shell has not been set.There’re several ways to solve this:For session-scope only:$ set -o viFor single user:$ vi ~/.profile…EDITOR=vi; export […]
Shell Script

How to Take Parallel Jobs to Background in One Line

Posted on
Suppose you’re a SA. In the beginning of the year 2016, you have to execute multiple system analysis reports parallelly for every month last year. In the first place, you execute the following 1 + 12 commands like the followings.     1  cd ~/reporting     2  nohup ./ ‘201501’ &     3  nohup ./ ‘201502’ &  […]