🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #7223

Re: Convertir a minúsculas en bash

#7223
From: Erich Lerch
Date: Thu, 20 Mar 2003 09:41
23 lines
1605 bytes
* Oscar Manuel G�mez Senovilla <omgs@escomposlinux.org>:
> Tengo un script en bash en donde se asigna manualmente un valor a una
> variable. Este valor es en may�sculas, pero necesito tener tambi�n ese
> mismo valor convertido autom�ticamente a min�sculas para otros usos.
> Actualmente lo pongo a mano (con la posibilidad de error que ello
> conlleva).

Una posibilidad es "tr":

# -----------------------------------
$ x='HOLA'
$ echo $x
HOLA
$ y=`echo $x|tr "[A-Z]" "[a-z]"`
$ echo $y
hola
# -----------------------------------

saludos,
e.
-- 
Erich Lerch
GnuPG-Key: http://lerchs.org/gpglerch.asc
Technical Details
Message-ID: <slrnb7j367.jd.lerch.news@gmx.ch>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!183.red-80-38-46.pooles.rima-tde.NET!not-for-mail
References: <b5c0c7$9ab$1@oscar.omgs.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,b570a64e8ee87b3
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-03-20 01:41:35 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!183.red-80-38-46.pooles.rima-tde.NET!not-for-mail
From: Erich Lerch <lerch.news@gmx.ch>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Convertir a minúsculas en bash
Date: Thu, 20 Mar 2003 10:41:27 +0100
Organization: http://lerchs.org
Lines: 23
Message-ID: <slrnb7j367.jd.lerch.news@gmx.ch>
References: <b5c0c7$9ab$1@oscar.omgs.es>
NNTP-Posting-Host: 183.red-80-38-46.pooles.rima-tde.net (80.38.46.183)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1048153294 75505555 80.38.46.183 (16 [88913])
X-Orig-Path: gurb.mine.nu!news
User-Agent: slrn/0.9.7.4 (Linux)