From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25235 invoked by alias); 2 Jun 2012 01:46:21 -0000 Received: (qmail 25227 invoked by uid 22791); 2 Jun 2012 01:46:20 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,SARE_FREE_WEBM_LAPOSTE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtpout2.laposte.net (HELO smtpout.laposte.net) (193.253.67.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Jun 2012 01:46:07 +0000 Received: from [192.168.0.133] ([84.100.228.42]) by mwinf8504-out with ME id HDm31j0040vXXw403Dm4w5; Sat, 02 Jun 2012 03:46:05 +0200 Message-ID: <4FC9709E.2030800@laposte.net> Date: Sat, 02 Jun 2012 01:46:00 -0000 From: Cyrille Lefevre User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Display a starting message References: <33921015.post@talk.nabble.com> <4FC3CB7E.50900@cs.umass.edu> <0105D5C1E0353146B1B222348B0411A20A770AB428@NIHMLBX02.nih.gov> In-Reply-To: <0105D5C1E0353146B1B222348B0411A20A770AB428@NIHMLBX02.nih.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-06/txt/msg00038.txt.bz2 Le 28/05/2012 23:21, Buchbinder, Barry (NIH/NIAID) [E] a =E9crit : > 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 pretty, how about this one :-) if [[ -w /etc/sshd_config ]]; then perl -pi -e 's/^#// if /PrintMotd/; s/yes/no/ if /PrintMotd/' /etc/sshd_config net stop sshd; net start sshd fi cat << 'EOF' > /etc/profile.d/banner.sh sed -e 's/ The .* to /\x1B[33;44;5m&\x1B[0;37;44m/' \ -e 's/|\(.*\)|$/\x1B[0;1m|\x1B[44m\1\x1B[1;40m|\x1B[0m/' \ -e '/./s/^/\x1B[0;32m/' -e 's/ __*$/\x1B[0;1m&\x1B[0m/' \ -e 's/jgs/\x1B[1;34;44mjgs\x1B[1;37;44m/' /etc/motd EOF PS : [ ! -z $PS1 ] =3D=3D [ -n $PS1 ], $SHLVL is bash only Regards, Cyrille Lefevre --=20 mailto:Cyrille.Lefevre-lists@laposte.net -- 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