From owner-freebsd-questions@FreeBSD.ORG Sat May 20 00:23:25 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 1018216A41F for ; Sat, 20 May 2006 00:23:25 +0000 (UTC) (envelope-from bsd-unix@earthlink.net) Received: from pop-satin.atl.sa.earthlink.net (pop-satin.atl.sa.earthlink.net [207.69.195.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9A7C43D45 for ; Sat, 20 May 2006 00:23:24 +0000 (GMT) (envelope-from bsd-unix@earthlink.net) Received: from fl-71-54-28-212.dhcp.sprint-hsd.net ([71.54.28.212] helo=kt.weeble.com) by pop-satin.atl.sa.earthlink.net with smtp (Exim 3.36 #10) id 1FhFFY-0001rK-00; Fri, 19 May 2006 20:23:20 -0400 Date: Fri, 19 May 2006 20:23:25 -0400 From: Randy Pratt To: Mathias Menzel-Nielsen Message-Id: <20060519202325.82a9f561.bsd-unix@earthlink.net> In-Reply-To: <446E47D6.1050706@matzsoft.de> References: <20060519.150338.12386.853944@webmail45.nyc.untd.com> <446E47D6.1050706@matzsoft.de> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org, gs_stoller@juno.com Subject: Re: colors in messages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2006 00:23:25 -0000 On Sat, 20 May 2006 00:33:58 +0200 Mathias Menzel-Nielsen wrote: > gs_stoller@juno.com wrote: > > > > Since I'm asking about FreeBSD (version 4.3), I'm asking about the echo , print , printf , etc. commands, and similar commands ib PERL , awk , etc. > > Where can I find the vt terminal encoding for this (hopefully on the internet)? > > > > Hi > > a simple googlin' for vt100 color codes brings this as first hit: > tp://www.termsys.demon.co.uk/vtansi.htm > > you can change colors by the escape sequences shown in the link resource. > > for example to get red text use: > echo ^[[31m > > you can get the escape character by pressing Ctrl-V followed by escape > in bash and vi and i suppose other environments.... A bit off-topic but I found this reference quite handy when experimenting with colors in scripts: http://www.tldp.org/linuxfocus/English/May2004/article335.shtml HTH, Randy --