bash prompts β€” some good links

2012-03-08 1 min read bash
Here are some pretty good links on the subject. Since there are already so many blog posts, does not make sense to add one more πŸ™‚ http://tldp.org/HOWTO/Bash-Prompt-HOWTO/c816.html http://www.gilesorr.com/bashprompt/prompts/ https://bbs.archlinux.org/viewtopic.php?id=84386 Bash themes – http://onlamp.com/onlamp/2006/02/02/bash_themes.html Related articles set prompts for bash Osx? (stackoverflow.com) Difference between Bash shell and Bash terminal? (stackoverflow.com) The Hollywood Reporter Rounds Up Jessica Chastian and Owen Wilson For a Pre-Oscars Bash (popsugar.com)

using `!#$’ to referance backward-word

2011-11-03 1 min read bash Linux
Image by jeffalldridge via Flickr Here is something that I found on the commandlinefu cp /work/host/phone/ui/main.cpp !#$:s/host/target Ah well…its very interesting and very useful. Some explanation: !# – means the current command (similar to !! being the last command) $ – represents the last parameter :s – is used for substitution. Related articles CommandLineFu: Amazing Collection Of Command Line Gems [Linux & Mac] (makeuseof.com) Oh, the Iron-y (ftalphaville.ft.com)

bash regular expressions

2011-02-06 1 min read bash
Here are some quick links on bash regular expressions, pretty good links to bookmark, if you use, regular expressions in bash regularly. I especially like the tldp link at number 3. http://www.linuxjournal.com/content/bash-regular-expressions http://www.ibm.com/developerworks/library/l-bash.html http://tldp.org/LDP/abs/html/parameter-substitution.html#VARMATCH http://wellington.pm.org/archive/200005/codegen/index9.htm Related articles Renaming a whole bunch of files at once, in bash (ask.metafilter.com) bash math (amit-agarwal.co.in) Efficiency of regular expressions (johndcook.com) Autogenerate Regular Expressions with txt2re (readwriteweb.com)

fork a new process in perl

2011-01-27 1 min read Uncategorized
I was doing something today and found that I require to fork a new process in perl. Now I had never done this earlier, so I did not know how to do this. First some background : I was doing some program very similar to http server, where the script accepts some input through a socket and then processes the same. In doing so I was seeing that the script was taking some time in processing the input and thus was not processing the second request until the first one was completed. 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)

Making your subjects more prominent and stand out in the photos with gimp.

2010-09-10 1 min read Photo
Lets first take a picture that we want to modify. We have done the corrections in the photo that are required like the curves, <a class="zem_slink" title="Colorfulness" rel="wikipedia" href="http://en.wikipedia.org/wiki/Colorfulness">saturation and others. So, here is the photo after the modification. Now we will make the modification to make photo de-saturated other than the subject of interest. <a href="http://blog.amit-agarwal.co.in/wp-content/gallery/home/DSC_0018.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/gallery/home/DSC_0018.jpg" alt="DSC_0018" /> Okay, now fire up gimp and open the <a class="zem_slink" title="Image" rel="wikipedia" href="http://en. Continue reading

Linux command to repeat a string n times - Super User

2010-07-20 1 min read bash Linux
I was working on something and needed to output the string n times. I have required this even to print a line with &#8217;-&#8217; or &#8217;=&#8217; but this time I badly wanted it in bash. So I searched google and found this: printf &#8221;Amit Agarwal%.0s&#8221; {1..5} Explanations and other examples: <a href="http://superuser.com/questions/86340/linux-command-to-repeat-a-string-n-times">http://superuser.com/questions/86340/linux-command-to-repeat-a-string-n-times<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.rateitall.com/i-3177235-flat-rate-us-terminations.aspx">1 reviews of Flat-Rate US Terminations (rateitall.com) <li class="zemanta-article-ul-li"><a href="http://www. Continue reading
Older posts Newer posts