🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Preguntilla de sed - Así lo he hecho

#7062
From: sio2
Date: Wed, 02 Apr 2003 21:54
24 lines
1714 bytes
El lunes, 31 de marzo de 2003, a las 10:42 GMT, sio2 escribi�:
> [...] 
> Lo que quiero es crearme un peque�o script (que use sed) , de manera
> que el script admita como par�metro un n�mero que indica el texto que
> quiero rescatar. Por ejemplo:
> [...] 

No s� si ser� lo mejor, pero por lo menos es bastante corto:

######
#!/bin/sh

parte=$(expr "$1" + 2)

awk -v RS='%' "NR==$parte"
######


-- 
Tu dulce habla, �en c�ya oreja suena?
                  --- Garcilaso de la Vega ---
   Si     Di�xido de Silicio |        Debian GNU/Linux 
  /  \         (SiO2)        |    Jos� Miguel S�nchez Al�s
 O    O   Mineral de Cuarzo  |  sio2.arr@ba.online.fr | URL #257033
Technical Details
Message-ID: <slrnb8mn0q.bm4.sio2.arr@cebolleta.net.dhis.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!22.red-80-37-129.pooles.rima-tde.NET!not-for-mail
References: <1b5b7a1f.0303310242.b117c5@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,d868d3e9f4413baf
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-04-02 20:26:34 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!22.red-80-37-129.pooles.rima-tde.NET!not-for-mail
From: sio2 <sio2.arr@ba.online.fr>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Preguntilla de sed - Así lo he hecho
Date: Wed, 2 Apr 2003 23:54:34 +0200
Lines: 24
Message-ID: <slrnb8mn0q.bm4.sio2.arr@cebolleta.net.dhis.org>
References: <1b5b7a1f.0303310242.b117c5@posting.google.com>
Reply-To: sio2.arr@ba.online.fr
NNTP-Posting-Host: 22.red-80-37-129.pooles.rima-tde.net (80.37.129.22)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1049343993 5314350 80.37.129.22 (16 [113866])
X-Orig-Path: cebolleta.net.dhis.org!news
User-Agent: slrn/0.9.7.4 (Linux)