Eliot Moss sent the following at Monday, May 28, 2012 3:01 PM >On 5/28/2012 2:26 PM, Shravan1804 wrote: >> I would like my cygwin terminal to display a starting message every time I >> start the program. For example something like "Hello Shravan, what do you >> want to do today?" or this type of pictures : > >Put something in your .bash_profile (or something like that). Not a >function of cygwin, specifically ...
Here is what I use in ~/.bashrc sed -e 's/ The .* to /\x1B[33;44;5m&\x1B[0;37;44m/' \ -e 's/|\(.*\)|$/\x1B[1m|\x1B[44m\1\x1B[1;40m|\x1B[0m/' \ -e 's/ __* $/\x1B[1m&\x1B[0m/' \ -e 's/jgs/\x1B[1;34;44mjgs\x1B[1;37;44m/' \ ~/hippo.txt <BEGIN hippo.txt> ____________________, ______________________________________ .QQQQQQQQQQQQQQQQQQQQQQQQL_ | | .gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ__ | | gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ== | _.---.) | QQQQQQQQQQQQQQQQQQQQQQQQQQQF= | (^--^)_.-" `; | QQQQQQQQQ================! | ) ee ( | | QQQQQQQQ | (_.__._) / | QQQQQQQQ | `--', ,' | QQQQQQQQ ~"jjj__, | jgs )_|--')_| | QQQQQQQQ "jjjjjjjjjj___ | ""' ""' | QQQQQQQQ ~jjjjjjjjjjjjjjjjj__ | | QQQQQQQQ _jjjjjjjjjjjjjj/~~~~ | The Hippo says: Welcome to | QQQQQQQQ .{jjjjjjj/~~~~~ | _ | QQQQQQQQ .{/~~~~` | ____ _ _ ____ _ _ _ (_) ____ | QQQQQQQQ | / ___)| | | | / _ || | | || || _ \ | QQQQQQQQ |( (___ | |_| |( (_| || | | || || | | || QQQQQQQQQL_______________, | \____) \__ | \___ | \___/ |_||_| |_|| QQQQQQQQQQQQQQQQQQQQQQQQQQQL___ | (___/ (____| | 4QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ___ | | (=QQQQQQQQQQQQQQQQQQQQQQQQQQQQQ==== | -.-. -.-- --. .-- .. -. | (QQQQQQQQQQQQQQQQQQQQQQQQF= |______________________________________| <END hippo.txt> However, I only want this in an interactive shell, so I test whether PS1 is greater than 0 in size. if [ ! -z "$PS1" ] I only want this with a new shell, not a subshell. So I test for the shell level. if [ ${SHLVL} = 1 ] I apologize for the lack of credit for the sources of the graphics; I don't remember where I found them. Enjoy! - Barry Disclaimer: Statements made herein are not made on behalf of NIAID. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple