🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Bash

#12231
From: Francisco F. Artese
Date: Fri, 17 Aug 2001 19:21
60 lines
2897 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Francisco F. Artese <frank@artese.com.ar> escribi�:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1

> Gonzalo Paniagua Javier <gpanjav@jazzfree.com> escribi�:
>> Francisco F. Artese <frank@artese.com.ar> escribi�:

>>        Toma. Aqu� lo tienes. :-)

>> ************
>> #!/bin/bash

>> horac=`date | cut -f4 -d" " | cut -f1 -d":"`
>> minutosc=`date | cut -f4 -d" " | cut -f2 -d":"`
>> segundosc=`date | cut -f4 -d" " | cut -f3 -d":"`

>> hc=`expr ${horac} \* 60 + ${minutosc} + ${segundosc} / 60`

>> echo $hc
>> ***********

> Hojala!!! lo tenga Gonzalo.

> este es el resultado:
> expr: error de sintaxis

Horoooooorr !! disculpa Gonzalo no hab�a visto que tu cambiaste
> horac=`date | cut -f4 -d" " | cut -f1 -d":"`
> minutosc=`date | cut -f4 -d" " | cut -f2 -d":"`
> segundosc=`date | cut -f4 -d" " | cut -f3 -d":"`

Y ahora horac y dem�s son num�ricas.

Muchas gracias

Pero.... por preguntar nada mas;

No existe, en bash, una forma de convertir un tipo de variable en otra ??

Saludos
- -- 
 WinError 02F: Illegal operation has caused an general error while
sharing resources with task 00BFD4 running under DOS window at 3B0 mode
and memory latency mode at 1-3-3-3. Please tell us what this means.
==============================================================
   Francisco F. Artese - Linux user #174223 - ICQ #17693614
            Linux Debian Potato 2.2 and IceWM 1.0.3
	         LAS MALVINAS SON ARGENTINAS!
==============================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7fW6tkdq1r8MtrroRAjDVAJ9LRCKhlQxrB/0LVMCPAUwwpcOYqACgzSdS
vb75u6Oi+IaO41E+usQj5Tw=
=b207
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <erqjl9.9h1.ln@127.0.0.1>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!200.68.207.80!not-for-mail
References: <hj97l9.p7j.ln@127.0.0.1> <slrn9nj7i2.b7.claudio@cacho.celta> <rgehl9.4u3.ln@127.0.0.1> <etfil9.tb.ln@127.0.0.1> <ulcjl9.8v1.ln@127.0.0.1>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,9df979b8f9cb249b
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-08-17 14:06:20 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!200.68.207.80!not-for-mail
From: "Francisco F. Artese" <frank@artese.com.ar>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Bash
Date: Fri, 17 Aug 2001 16:21:18 -0300
Lines: 60
Message-ID: <erqjl9.9h1.ln@127.0.0.1>
References: <hj97l9.p7j.ln@127.0.0.1> <slrn9nj7i2.b7.claudio@cacho.celta> <rgehl9.4u3.ln@127.0.0.1> <etfil9.tb.ln@127.0.0.1> <ulcjl9.8v1.ln@127.0.0.1>
NNTP-Posting-Host: 200.68.207.80
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 998082379 10400779 200.68.207.80 (16 [42069])
X-Orig-Path: not-for-mail
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.2.17 (i686))