Article View: es.comp.os.linux.programacion
Article #6513Re: Conocer si un script se ha llamado a sí mismo
From: sio2
Date: Fri, 13 Jun 2003 13:38
Date: Fri, 13 Jun 2003 13:38
39 lines
2599 bytes
2599 bytes
El viernes, 13 de junio de 2003, a las 03:04 GMT, Pascal Bourguignon escribi�:
>> Para separar cada parte uso awk:
>> [...]
>
> � Porque no metamail ?
�Por que no sab�a que exist�a? Lo probar� a ver...
>
>#!/bin/bash
> export METAMAIL_TMPDIR=/tmp/$$
> mkdir $METAMAIL_TMPDIR
> trap "rm -rf $METAMAIL_TMPDIR " 0
> metamail -w < mensaje
> ls -l $METAMAIL_TMPDIR
> file $METAMAIL_TMPDIR/*
>
>
> y ya tienes 95% de lo que quieres.
>
Pues mirando esto que has hecho se me ha ocurrido que el awk en vez de
ejecutar un script puede direccionar a un fichero temporal (cuyo nombre
dependa del valor de NR). Y luego no tengo m�s que ir analizando los
ficheros uno a uno. As� evito que haya dos script. Con uno que tenga
unas cuantas funciones me basta...
Probar� ambas cosas (awk y metamail).
Muchas gracias.
--
Hay dos sistemas de conseguir la felicidad: uno, hacerse
el idiota; otro, serlo.
--- Enrique Jardiel Poncela. --
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:
<slrnbejku2.vqt.sio2.arr@cebolleta.net.dhis.org>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!22.red-80-37-129.pooles.rima-tde.NET!not-for-mailReferences:
<slrnbe9djd.5nd.sio2.arr@cebolleta.net.dhis.org> <874r2z2jgb.fsf@thalassa.informatimago.com> <slrnbe9o73.9t5.sio2.arr@cebolleta.net.dhis.org> <8765nex5ab.fsf@thalassa.informatimago.com> <bc32c8$5j1$1@nsnmrro2-gest.nuria.telefonica-data.net> <slrnbeb4u3.m6c.sio2.arr@cebolleta.net.dhis.org> <tg7hr-qgl.ln1@mithrandir.intranet> <slrnbec3e8.tjo.sio2.arr@cebolleta.net.dhis.org> <87of12d6fi.fsf@thalassa.informatimago.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,9e3b5a3ca8b4d64b X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2003-06-13 11:30:12 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!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: Conocer si un script se ha llamado a sí mismo Date: Fri, 13 Jun 2003 15:38:10 +0200 Lines: 39 Message-ID: <slrnbejku2.vqt.sio2.arr@cebolleta.net.dhis.org> References: <slrnbe9djd.5nd.sio2.arr@cebolleta.net.dhis.org> <874r2z2jgb.fsf@thalassa.informatimago.com> <slrnbe9o73.9t5.sio2.arr@cebolleta.net.dhis.org> <8765nex5ab.fsf@thalassa.informatimago.com> <bc32c8$5j1$1@nsnmrro2-gest.nuria.telefonica-data.net> <slrnbeb4u3.m6c.sio2.arr@cebolleta.net.dhis.org> <tg7hr-qgl.ln1@mithrandir.intranet> <slrnbec3e8.tjo.sio2.arr@cebolleta.net.dhis.org> <87of12d6fi.fsf@thalassa.informatimago.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 1055529011 17744785 80.37.129.22 (16 [113866]) X-Orig-Path: cebolleta.net.dhis.org!news User-Agent: slrn/0.9.7.4 (Linux)