ShellCheck – check basic POSIX shell script errors


Here is description of the tool: […] To install dnf install ShellCheck And just run the tool on the script to get the common errors.

evvsubst – substitute variables in text in shell


First you need to install gettext, which by the way might be already installed, however you can install with dnf install gettext Details of the package: […] Usage examples:

ionice – renice you IO activity for the process.


ionice is utility provided by the package util-linux. Description of util-linux: […]  […] With the help of this utility, you can set the scheduler priority for your IO scheduling upto …

ssh authorized keys – limit ssh session to custom command


If you want a ssh key to be able to run a custom command only and nothing beyond that, then you can use the “command” option in the authorized_keys file of ssh.  For example, to limit user to run only …

nice little bash function to search for running processes


Here is a nice little handy function that I use very regurlarly. You can use this function with parameter to just grep for that or just type psa to see all the running processes. Just put this in your …

bash – refer the first parameter from last command quickly


To refer to first parameter from the last command quickly, you can use !^ Note: This can also be referred as “!!:1“

bash refer parameters from the current command


In bash you can use !# to refer to any parameter from the current command, example:

Debuggging bash cron scripts.


I have to several times debug scripts that I get complain about working when logging in normally but they do not work when run in cron mode. So, quite a lot of times, redirecting the stderr of the …


bash debug – log all executed commands


Whenever I am writing a script in perl or bash, I always wish that there was some way to have all the commands logged or output to screen. I know there is “set -x” option to have debugging enabled, …

bash – using the vi mode more effectively.


You can first set the bash mode to vi. This will enable some vim like features to bash. So, add this to .bashrc : set -o vi Once, you have done that then its time to get more out of the vi mode. …

bashrc with lots of functions and useful alias


Here is a link of a useful 10K lines bashrc You may not want to put the whole thing, but get an idea and use what you think can be helpful to you or at-least get an idea. …

poor mans watch, watch for solaris


Here is a simple script that you can use as watch in Solaris as well.

This website uses cookies to ensure you get the best experience on our website. Learn more Got it