On Nov 23, 2007 9:05 PM, Shamail Tayyab <[EMAIL PROTECTED]> wrote: > Hi, > I've 2 queries.. > 1. How can i make bash to display stdout and stderr in different > colors? If its possible..
I will take a stab at this one. See below for a sample: $ exec 3>&1 $ cat x 2>&1 >&3 | xargs echo -e "\033[40;31;1m" cat: x: No such file or directory <-- this appears in red $ exec 3>&- $ cat >> x << ! > test line 1 > test line 2 > ! $ exec 3>&1 $ cat x 2>&1 >&3 | xargs echo -e "\033[40;31;1m" <-- out is in normal color test line 1 test line 2 $ exec 3>&- $ rm x $ exec 3>&1 $ cat x 2>&1 >&3 | xargs echo -e "\033[40;31;1m" cat: x: No such file or directory <-- this appears in red again $ exec 3>&- HTH, -- Manish References: 1. http://www.tuxmachines.org/node/11104 2. http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/io-redirection.html > 2. I always have to start gnome-theme-manager on a non-gnome desktop > to bring the gtk 2.0 looks to the gtk based applications.. what is the > underlying application that i can auto start to avoid this task? > _______________________________________________ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Next Event: http://freed.in - February 22/23, 2008 Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/