[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing escape format when values are empty
From: |
Christopher Dimech |
Subject: |
Re: Fixing escape format when values are empty |
Date: |
Thu, 8 Apr 2021 19:27:17 +0200 |
Crazy Shit! I like it :)
---------------------
Christopher Dimech
General Administrator - Naiad Informatics - GNU Project (Geocomputation)
- Geophysical Simulation
- Geological Subsurface Mapping
- Disaster Preparedness and Mitigation
- Natural Resource Exploration and Production
- Free Software Advocacy
> Sent: Thursday, April 08, 2021 at 11:06 PM
> From: "Greg Wooledge" <greg@wooledge.org>
> To: help-bash@gnu.org
> Subject: Re: Fixing escape format when values are empty
>
> On Wed, Apr 07, 2021 at 10:49:41PM -0500, Dennis Williamson wrote:
> > On Wed, Apr 7, 2021, 10:47 PM <pauline-galea@gmx.com> wrote:
> >
> > > I am using the following format to use colour when displaying text.
> > > an is the attribute number, bn is the background number, fn is the
> > > foreground number.
> > >
> > > fmt="\e[${an};${bn};${fn}m"
> > > printf "${fmt}%s\e[0m" "Jane"
>
> > > But "an", "bn", "fn" can be empty, and I then have to
> > > fix fmt.
>
> "Fix" in what way?
>
> > Please use tput.
>
> They're doing crazy shit. I don't think tput can do this. tput is
> designed only to do regular shit.
>
>