🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ¿cómo pasarle los datos de un archivo a un script?

#16391
From: J.A. Gutierrez
Date: Wed, 26 Apr 2000 00:00
38 lines
1750 bytes
primit@nodo50.org wrote:

:  ./hacer_copias < empaquetar

: solo pilla la primera l�nea del fichero empaquetar, tambi�n me pasa si
: lo incluyo dentro del script

: read f < empaquetar

while read line
do
	files="$files $line"
done < file

	(eso si, seria conveniente que cambiaras el LABEL)

: El c�digo es el siguiente:


: #!/bin/sh
: #
: echo "Directorio a comprimir: "
: read f
: LABEL=bck_`hostname`_`date -u +%y/%m/%d`_"$f"
: LOG=/var/COPIAS_SEGURIDAD/log/`echo $LABEL | tr '/' '-'`
: TAPE=/var/COPIAS_SEGURIDAD/`echo $LABEL | tr '/' '-'`.tar.gz

	eh, eso me suena ;-)

: --totals \
: $f \
:>$LOG.log 2>$LOG.err

-- 
PGP and other useless info at      \                 Oh, show us the way
http://www.cps.unizar.es/~spd/      \             to the next whisky bar
finger://daphne.cps.unizar.es/spd    \                      Weill/Bretch
es doloroso ser sabio y descubrir la sopa de ajo                   (Pla)
Technical Details
Message-ID: <8e74k4$lur$3@news.unizar.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <e56bgs8h924d63124vvealn7da34bnm29r@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,759a087e068186e1
X-Google-Attributes: gidf86c8,public
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Subject: Re: ¿cómo pasarle los datos de un archivo a un script?
Date: 2000/04/26
Message-ID: <8e74k4$lur$3@news.unizar.es>
X-Deja-AN: 615956265
Content-Transfer-Encoding: 8bit
References: <e56bgs8h924d63124vvealn7da34bnm29r@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Complaints-To: usenet@news.unizar.es
X-Trace: news.unizar.es 956765636 22491 155.210.152.20 (26 Apr 2000 16:13:56 GMT)
Organization: Rank
Mime-Version: 1.0
User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (IRIX/6.2 (IP22))
NNTP-Posting-Date: 26 Apr 2000 16:13:56 GMT
Newsgroups: es.comp.os.linux.programacion