Multiple search in vim

2009-11-19 1 min read Learning Linux

I was looking at a log file and needed to highlight multiple search items to make the logs more readable. I got into multiple threads suggesting various cryptic vim commands but I was in no mood to remember them. So, I finally hit <a href="http://www.vim.org/scripts/script.php?script_id=479" target="_blank">this.

This is a cool vim script which you can use to highlight multiple search patter. You can simply add a search term by doing

Continue reading

Calculations

2009-11-17 1 min read Fedora Learning Linux

<img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/perl-one-liners.jpg" alt="Perl One Liners" align="bottom" />This is the third part of a seven-part article on famous Perl one-liners. In this part I will create various one-liners for calculations. See <a href="http://www.catonmat.net/blog/perl-one-liners-explained-part-one/">part one for introduction of the series.

Famous Perl one-liners is my attempt to create β€œperl1line.txt” that is similar to β€œ<a href="http://www.catonmat.net/blog/awk-one-liners-explained-part-one/">awk1line.txt” and β€œ<a href="http://www.catonmat.net/blog/sed-one-liners-explained-part-one/">sed1line.txt” that have been so popular among Awk and Sed programmers.

The article on famous Perl one-liners will consist of at least seven parts:

Continue reading

chatting with your friends when all chat sites are blocked.

2009-11-15 1 min read Linux

You can use, <a href="http://chat.aka-photo.com/">http://chat.aka-photo.com/.
I just installed it to keep my self connected with the other friends of mine. Does not store the data for long and no need to create a username if you dont want to .. just enter any name in the username and press enter. Ask the other person to join the same room and that&#8217;s it.

Oh, BTW, I bought this domain to lauch another <a href="http://eshop.aka-photos.com">e-shop or at <a href="http://shop.aka-photos.com">shop. Aha, do let me know which one looks better.

Continue reading

How a live distro can save you.

2009-11-08 1 min read Linux

Some time back I wrote about <a href="http://blog.amit-agarwal.co.in/2009/03/07/" target="_blank">how to use a live distro without CD or VM. Today that experiment saved my day.

My RAM went bad couple of days without my knowledge and I kept using the system finally causing the &#8221;/usr&#8221; to be completed unusable.Β  And that is when I was able to still login to the system, as I still had that Nimble X installed on the HDD without actually installing it. Now I need to re-install the OS but at least for the time being I am able to use my system. πŸ™‚

Continue reading

Linux xdg-open β€” replacement for start in windows

2009-11-05 1 min read Fedora Linux

if you want to open any document with the default document handler from the bash prompt or command prompt in linux then the simplest way to do that is use &#8221;xdg-open&#8221;.

This can also be used in bash scripts to allow users to select which document to open without worrying about if a particular application is installed or not. Example could be where you have list of documents in the current directory (same kind or of different format.) and you want the user to select the document. In such a scenario you can take the user input for the filename and user &#8221;xdg-open filename&#8221; to open the file irrespective of the file type or worrying about if xpdf is installed or abiword is installed or not.

Continue reading
Older posts Newer posts