From owner-freebsd-questions@FreeBSD.ORG Wed Dec 22 02:10:35 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F47F16A4D7 for ; Wed, 22 Dec 2004 02:10:34 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEC8543D1F for ; Wed, 22 Dec 2004 02:10:31 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] (pool-68-160-208-232.ny325.east.verizon.net [68.160.208.232]) by pi.codefab.com (8.12.11/8.12.11) with ESMTP id iBM2AQqM052817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Dec 2004 21:10:27 -0500 (EST) Message-ID: <41C8D79A.4000203@mac.com> Date: Tue, 21 Dec 2004 21:10:34 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Valeri Vassiliev References: In-Reply-To: X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.8 required=5.5 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=disabled version=3.0.1 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on pi.codefab.com cc: questions@FreeBSD.org Subject: Re: motd in color X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2004 02:10:35 -0000 Valeri Vassiliev wrote: [ ... ] > hi, want to to know if its possible to colorize the /etc/motd with > escape sequences, if yes how ? If you are willing assume the user is always going to be on a certain terminal type which supports color, yes, you can certainly add the terminal-specific ESC sequences to /etc/motd via an editor which supports binary input (emacs has a hex mode for this, for example). It's probably not a great idea, though. I'd be more tempted to write a C program which queried TERMCAP or use curses to deal with color properly if I thought it was worth the effort in the first place, although some shells (zsh, maybe bash) also have decent support for color in their scripts. -- -Chuck