Remove Invalid characters in Filename.

2010-01-10 1 min read Linux Photo

Sometimes I end up having some invalid characters in filename like ? & and so on.

So simple bash script to get rid of them:

for i in `find . -type f`
do
echo $i
mv $i `echo $i |tr ? _|tr = _ |tr ’&’ ’_’`
done <a name="more">

change the terminal title dynamically in X11

2010-01-09 1 min read Bash GNOME Linux

I was actually looking for this for quite sometime. Some years back in my bashrc was the proper setting for setting the terminal title when I did a cd, and I had completely forgotten how to do it. So today I searched quite a few commands the environment variables for doing the same and found it again.

Here it is (Just put this in your bashrc or bash_profile):

export PROMPT_COMMAND=&#8217;echo -ne &#8221;\033]0;`pwd`&#8221;; echo -ne &#8221;\007&#8221;&#8217;

Continue reading

The document editor that is revolutionary and breaking the typewriter paradigm.

2010-01-08 1 min read Fedora Linux

Today, I thought I will try something different for word processor requirements, for non-text files. For text  files, vi rocks for me 🙂

So, I tried LyX, here is the description of the editor:

Description: LyX is a modern approach to writing documents which breaks with the
obsolete &#8221;typewriter paradigm&#8221; of most other document preparation
systems.  It is designed for people who want professional quality
output with a minimum of time and effort, without becoming
specialists in typesetting.  The major innovation in LyX is WYSIWYM
(What You See Is What You Mean). That is, the author focuses on
content, not on the details of formatting. This allows for greater
productivity, and leaves the final typesetting to the backends
(like LaTeX) that are specifically designed for the task.  With
LyX, the author can concentrate on the contents of his writing, and
let the computer take care of the rest.

<img src="file:///tmp/moz-screenshot.jpg" alt="" />

Continue reading

using cscope with vim

2010-01-08 0 min read Linux Vim Tips
\"Google
Image by schoschie via Flickr

Here&#8217;s the best of the two links that I found with <a class="zem_slink freebase/en/google" title="Google" rel="homepage" href="http://google.com">Google and <a class="zem_slink" title="Bing" rel="homepage" href="http://bing.com/">Bing combined out of lots of links that I think can help you understand how to use cscope with vim, if you dont know already.

<a href="http://cscope.sourceforge.net/cscope_vim_tutorial.html">http://cscope.sourceforge.net/cscope_vim_tutorial.html
<a href="http://www.faqs.org/docs/ldev/0130091154_242.htm">http://www.faqs.org/docs/ldev/0130091154_242.htm

Continue reading

Sendmail host map failure issue with sendmail.

2010-01-07 1 min read Linux

I was having this issue for long time with sendmail and not getting time to fix this. Finally today I found the solution.
<span style="font-weight: bold;">define(`confBIND_OPTS&#8217;, `WorkAroundBrokenAAAA&#8217;)dnl
Add the above line in the sendmail.mc file and rebuild sendmail.cf.

Done. Quite simple but really took some time for me to fix.<span style="font-weight: bold;">
Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/Linux" rel="tag">Linux, <a class="performancingtags" href="http://technorati.com/tag/sendmail" rel="tag">sendmail, <a class="performancingtags" href="http://technorati.com/tag/AAAA" rel="tag">AAAA, <a class="performancingtags" href="http://technorati.com/tag/failure" rel="tag">failure

Continue reading

shell — one liner to selectively change case

2010-01-07 2 min read Bash

Today I had a hard time, I had a herculian task of converting the case of file to upper case. Well that&#8217;s not difficult :), I know. What made it difficult was the fact that not the whole file had to be converted but only selective lines containing the work important. Okay now that too is not so difficult, I thought. But again the file size was huge, it had some 9 million lines. So, I just thought of trying my skills of shell programming (dont have much of it anyway). So here&#8217;s what I did:

Continue reading

Picture Collage Maker 2.0

2010-01-06 1 min read Photo

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">

<table CELLSPACING="0" CELLPADDING="0" WIDTH="100%">

<font SIZE="6"><a HREF="http://feedproxy.google.com/~r/photographyblog/~3/8SSu3N8oWRs/">Picture Collage Maker 2.0

<a HREF="http://www.photographyblog.com/news/picture_collage_maker_2.0/"><img SRC="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/mask-bar-533x400.jpg" WIDTH="533" HEIGHT="400" ALIGN="bottom" ALT="News image"/>

Pearl Mountain Software has released Standard and Pro editions of Picture Collage Maker v. 2.0, a simple-to-use Windows program that turns ordinary photos into collages, scrapbooks, invitations, calendars or greeting cards.

<a HREF="http://www.photographyblog.com/news/picture_collage_maker_2.0/">Read more and comment »

<img SRC="http://blog.amit-agarwal.com/wp-content/uploads/amit-agarwal.co.in/~r/photographyblog/~4/8SSu3N8oWRs" WIDTH="1" HEIGHT="1" ALIGN="bottom" BORDER="0"/>

Continue reading
Older posts Newer posts