script

bash 4.0 – new feature mapfile

2011/01/14

Recently I encountered a problem where I had to create couple of arrays in bash and these were quite dynamic in nature. This script was supposed to be used by couple of guys whom I did not trust too …

perl is faster than bash in some cases.

2011/01/11

Some days back, I had to generate some data to be uploaded to a database. As usual I assumed that bash should be faster and hence wrote the script to create the files in bash. But I found that even …

Broadcast your shell thru port 5000

2010/11/20

Broadcast your shell thru port 5000 […] <td> <div class="text codecolorer"> mkfifo /tmp/fifo;(nc -q0 -l 5000 < /tmp/fifo &);script -f /tmp/fifo </div> …

Quick tip on zipping logs in real time.

2010/10/13

Sometimes, some small things that we don’t actually think can be useful are such useful. I faced this couple of days back when I was working on something and the amount of logs getting generated and …

Use the last command\’s output as input to a command without piping and bind to it to a key sequence in bash.

2010/09/01

Use the last command&#8217;s output as input to a command without piping and bind to it to a key sequence in <a class="zem_slink" title="Bash (Unix shell)" …

Getting your wordpress self hosted stats on your console with bash script.

2010/06/29

Some time back I wrote a blog on how to get your site stats using curl in <a class="zem_slink freebase/en/bash" title="Bash" rel="homepage" …

Delete Files older than 14 days

2010/06/25

Taken from Dzone. […] @echo on setlocal set srcDir=. […] Read more: <a href="http://snippets.dzone.com/posts/show/10441">http://snippets.dzone.com/posts/show/10441

bash one liner to change/remove test pattern from config file or text file.

2010/06/25

Problem: I had a directory with a lot of config files in the ini file format, i.e. name and value separated by equals. Some/all of these contained some directory names and other values which had to be …

Script to add all the partitions to the fstab.

2010/06/24

I wrote a simple script today to get all the partitions on all the disks and then create <a class="zem_slink freebase/en/fstab" title="Fstab" rel="wikipedia" …

Customize Your Firefox Browsing Experience On Your Favorite Websites

2010/06/23

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category […] <img …

Scripts to create logins from bash command – for creating multiple accounts

2010/06/09

Heres the script: […] cat «EOF > login.sh for i in `cat logins` ; do login=`echo &#8221;$i&#8221;|awk -F&#8221;:&#8221; '{print $2}&#8217;`; …

Menu driven ssh.

2010/05/24

I have quite a lot of servers where I need to ssh at workplace and I generally don&#8217;t remember all of them, so I wrote a simple yet useful script. In all the servers I have already copied my …


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