[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ping] declare -c still undocumented.

From: felix
Subject: Re: [ping] declare -c still undocumented.
Date: Fri, 13 Nov 2020 10:33:55 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Nov 13, 2020 at 12:19:27AM +0100, Léa Gris wrote:
> Happy 10 years 10 months anniversary to the issue:
> <https://lists.gnu.org/archive/html/bug-bash/2010-02/msg00074.html>
> >         address@hidden:~$ declare -c moo=moo; echo $moo
> >         Moo

  cap() { local -ca _cap=("$@");echo ${_cap[*]};}
  cap great éric.
  Great Éric.

Like this:

  ${parameter:~pattern}  Toggle case of 1st character if matching optional 
  ${parameter:~~pattern} Toggle case of all characters regarding pattern:

  cap() { local -cl _cap=("$@");echo ${_cap[*]~};}
  cap great éric. 
  Great Éric.

  myvar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; echo 

 Félix Hauri  -  <felix@f-hauri.ch>  -  http://www.f-hauri.ch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]