Article View: es.comp.os.linux.programacion
Article #9792Re: shell script
From: Fernando Arbeiza
Date: Sun, 19 May 2002 16:30
Date: Sun, 19 May 2002 16:30
18 lines
1509 bytes
1509 bytes
On Sun, 19 May 2002 15:32:59 GMT, HARE <miguel@nalsite.com> wrote:
> sabria alguin decirme si hay alguna orden que me diga si el contenido de una
> variable es numerico??
> isnumeric() o algo asi?
Hola:
No has dicho que shell utilizas, pero imaginemos que es
bash. Algo as� deber�a funcionar:
test ${VARIABLE} -a -z ${VARIABLE/#[0-9.]*/}
Comprueba que VARIABLE existe y que est� formada s�lo por
d�gitos o alg�n punto.
--
Fernando Arbeiza
Cantabria, Spain
Technical Details
Message-ID:
<slrnaefkc6.2ft.arbeizaf@jupiter.olimpo>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!proxad.net!proxad.net!noos.fr!teleglobe.net!newsf01.ono.com!news.ono.com.POSTED!not-for-mailReferences:
<LAPF8.34865$s6.265112@telenews.teleline.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,718dd2fff78389e1 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-05-19 09:29:27 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!proxad.net!proxad.net!noos.fr!teleglobe.net!newsf01.ono.com!news.ono.com.POSTED!not-for-mail Newsgroups: es.comp.os.linux.programacion From: Fernando Arbeiza <arbeizaf@ono.com> Subject: Re: shell script References: <LAPF8.34865$s6.265112@telenews.teleline.es> Message-ID: <slrnaefkc6.2ft.arbeizaf@jupiter.olimpo> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit User-Agent: slrn/0.9.7.4 (Linux) Lines: 18 Date: Sun, 19 May 2002 16:30:14 GMT NNTP-Posting-Host: 62.42.152.171 X-Complaints-To: abuse@ono.com X-Trace: news.ono.com 1021825814 62.42.152.171 (Sun, 19 May 2002 18:30:14 MET DST) NNTP-Posting-Date: Sun, 19 May 2002 18:30:14 MET DST