🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Ayuda con Shell Script !

#9471
From: Angel
Date: Thu, 04 Jul 2002 09:22
31 lines
1536 bytes
Dmartin wrote:

> Cosas varias....

> �Como puedo leer cada una de las lineas del fichero?
ter recomiendo awk
> �Puedo pasar variables entre bash, awk, sed, ...?
en shell:
 programilla.awk --assign Var=$var
dentro del awk la variable Var, valdra el valor de la variable $var en 
sh.
> �Puedo ejecutar un comando bash desde awk?

 comando="ls -l / 2>/dev/null"
 while ((comando | getline) > 0)
 {
   print $0
 }

O
 system("ls /" myvarenawk "-la" )

> 
> �Alguna idea?

Espero que esto te sirva.

-- 

Liso. -Eadem Mutata Resurgo-
Linux has you...
Technical Details
Message-ID: <ag13s1$i6rfv$1@ID-148170.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!80-24-166-73.uc.nombres.ttd.ES!not-for-mail
References: <cc2533a6.0207032356.7332fce4@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,90d89dc0e61cc9ec
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-07-04 02:17:55 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!80-24-166-73.uc.nombres.ttd.ES!not-for-mail
From: Angel <a.lis@bussitel.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Ayuda con Shell Script !
Date: Thu, 04 Jul 2002 11:22:18 +0200
Organization: Bussitel S.A.
Lines: 31
Message-ID: <ag13s1$i6rfv$1@ID-148170.news.dfncis.de>
References: <cc2533a6.0207032356.7332fce4@posting.google.com>
Reply-To: a.lis.quita@bussitel.es
NNTP-Posting-Host: 80-24-166-73.uc.nombres.ttd.es (80.24.166.73)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
X-Trace: fu-berlin.de 1025774273 19099135 80.24.166.73 (16 [148170])
User-Agent: KNode/0.6.1