Display a starting message
Cyrille Lefevre
cyrille.lefevre-lists@laposte.net
Sat Jun 2 01:46:00 GMT 2012
Le 28/05/2012 23:21, Buchbinder, Barry (NIH/NIAID) [E] a écrit :
> 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 ] == [ -n $PS1 ], $SHLVL is bash only
Regards,
Cyrille Lefevre
--
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
More information about the Cygwin
mailing list