grep
Creating and using ackrc
2022/04/02
ack is a fantastic replacement for grep and probably much more than grep. Here is what the dnf info has to say about ack […] 1 2 3 4 5 6 Name : ack Architecture : noarch Summary : Grep-like …
using cat with grep – why?
2020/01/06
GREP_COLORS – change the colors in the GREP output.
2019/04/22
Today we will look at the variable GREP_COLORS. This variable determines the colour that is used with the grep command. You can look at the man page of the grep command to see what the various options …
Get count of lines in scripts (shell)
2015/10/15
If you have tried to get the count of lines in file, the you would know about “nl” or “wc -l”. But as you are aware these give you number of lines with other details as well and you need to post …
nice little bash function to search for running processes
2014/10/13
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 …
Raspberry Pi automate certain tasks – script example
2014/03/10
Now, if you have followed these : fetchmail ssmtp Then you already have a working system for sending and receiving mail. Now, you can set the mda in the fetmailrc to a script which can do few things …
Apache server stats with small and useful bash script.
2013/11/29
Just copy this script to your web-server cgi-bin directory and enjoy. The script with show the common errors like 404 Error, Internal Server Error and others. It will show the User agent distribution …
bash – using the vi mode more effectively.
2013/11/22
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. …
Check all vim colorschemes for minor issues
2013/10/10
Here is script that checks all the colorschemes in the current directory and corrects them if possible (Processing of the file is done with simple commands like sed, grep) Checks that the color_name …
dnsmasq not starting from NetworkManager with SELinux enabled.
2013/03/16
Some time back I posted on dnsmasq starting from Network Manager and how to setup dnsmasq. Now, couple of days back , I setup dnsmasq in NetworkManager but was astonished to see that there was no …
Disable a few cores when you want to save power.
2012/12/28
If you have a lot of CPU power and working on battery. If you do not need that much of power and would like to rather save some battery power by disabling some cpus then you can use the below script. …
BASH Script Performace
2012/01/06
Today we will look at some bash code snippests and the performance issues. Lets first look at the problem and the implemented solution: Problem: We needed to log the output of the ps command for all …