Shell script
send mail using telnet from script
2017/12/25
If you have no other option but to use telnet with authentication to send mail 🙂
change the output format for time command
2016/08/16
If you are doing some scripting and using ‘time’ command, then you know sometimes it becomes difficult to capture the output as the output would be something like this: : amit ; time ls real 0m0.002s …
bash refer parameters from the current command
2014/09/15
In bash you can use !# to refer to any parameter from the current command, example:
Home grown mail scheduler with bash script and cron
2013/10/04
If you are using Linux (Fedora/Ubuntu or anything else) then you do get a lot of tools and one of them is cron. Very very useful. Just write some script that can do the task for you, put it in cron …
Delete all but some directories
2013/08/16
I think, like me, you would have faced a lot of situations, where you wanted to delete all the files or directories in a location, leaving only the required files/directories. So, I have a directory …
convert tabs to spaces, the easy way
2013/07/08
Lots of times you want to convert tabs to spaces and sometimes from a shell script, if that is the case, then simple solution is “tidy“. First you need to install tidy as follows: sudo yum install …
quick bash script for datewise backup of directory
2012/12/12
I was working on something and the data was very critical and needed backup. I wrote a bash script to back up the data every 5 hours with cron and bash script. Thought I will share that with you. Here …
15 Linux Bash History Expansion Examples You Should Know
2012/03/02
Here is a nice link on BASH History Expansion. There are lot of examples in this page and some of them might be quite useful. But here are my list of favourites: !! This is probably the most used one …
Unix shell script for removing duplicate files
2011/05/16
The following shell script finds duplicate (2 or more identical) files and outputs a new shell script containing commented-out rm statements for deleting them (copy-paste from here): ::: updated on 02 …
Shell Scripting
2011/01/05
Here are some links for bash programming that you may find useful. http://tips-linux.net/en/content/pro-bash-programming http://tips-linux.net/en/content/expert-shell-scripting …
mussh - Multihost SSH wrapper
2010/05/25
Description: […] Mussh is a <a class="zem_slink freebase/en/shell_script" title="Shell script" rel="wikipedia" …
Awk Introduction Tutorial – 7 Awk Print Examples
2010/05/19
awk examples Awk Introduction Tutorial – 7 Awk Print Examples This is the first article on the new awk tutorial series. We’ll be posting several articles on awk in the upcoming weeks that will cover …