Resize all the images in directory.

2010-10-04 2 min read bash Linux Photo
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;"> Image via <a href="http://commons.wikipedia.org/wiki/File:Solmeta_N2_auf_Nikon_D5000_Rueckansicht.JPG">Wikipedia</a> </dd> </dl> When I take a photo with my DSLR Nikon D5000, the size of the image comes to around 5MB and I know that with my point and shoot camera also it does not come to any lesser than 3MB. Definitely this is quite good to keep the images in the same size for use but when it comes to on-line sharing I don’t think this is the size that is required. Continue reading

[Solved] Abbreviations not working in vim

2010-10-02 1 min read bash Learning Vim Tips
Today I found that abbreviations are not working in vim in my current login. I searched log of blog’s and sill did not find any solution so I decided to take the matters in my hand. To start with I disabled all the plugin’s by moving my plugin directory. This did not help me solve the issue, so the only other option left was to now disable the vimrc file completely. Continue reading

bash script to run a command and take screenshot in every loop.

2010-09-24 2 min read bash Fedora Learning Linux
Couple of days back, I had posted a command to display a stop timer with bash and echo. There I had also put the following gif file: <img class="size-medium wp-image-2555" title="bash screenshot for the script output" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/09/temp-300x170.gif" alt="bash screenshot for the script output" width="300" height="170" /> Here the tricky part was to capture the jpg&#8217;s to create the gif file. Preparation: Rename the terminal to aka – amit-capture Execute the command once with the import command and check the output and jpg&#8217;s Continue reading

bash – echo command with option to display the output on the same line.

2010-09-21 2 min read bash Fedora Learning Linux
Here is a nice little trick to display the output in the same line : 1 <td> <div class="bash codecolorer"> &nbsp;<span class="kw3">echo</span> <span class="re5">-ne</span> <span class="st0">"output\<span class="es1">\r</span>"</span> </div> </td> </tr> The trick here is simple, first we disable the <a class="zem_slink" title="Newline" rel="wikipedia" href="http://en.wikipedia.org/wiki/Newline">newline printed by <a class="zem_slink" title="Echo (command)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Echo_%28command%29">echo command with the &#8221;-n&#8221; option and then we enable the interpretation of the <a class="zem_slink" title="Backslash" rel="wikipedia" href="http://en. Continue reading

cURL – Tutorial

2010-09-15 1 min read bash Fedora Linux
Here are linkw to two nice tutorials on curl and how to use curl to login before we try to fetch a page. Hope you find them useful. http://curl.haxx.se/docs/httpscripting.html http://www.youtube.com/watch?v=XcgQUsorF_8 http://scriptasy.com/php_11/tutorial-curl-login_44.html Related articles by Zemanta {."zemanta-related-title"} How To Display Just The HTTP Response Code In CLI Curl (beerpla.net)

Remove some path from the PATH variable temporarily.

2010-09-04 2 min read bash Linux
How many times has it happened to you that you are working on some linux platform (like Fedora/Ubuntu/CentOS etc) and suddenly you see that you need to remove some path from the PATH variable so that a script is executed from some other path. It really difficult to do this if the path is too long and if you end up doing this couple of times. If that is the case, then the below script is for you 🙂 Continue reading
Older posts Newer posts