🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#16321
From: Victor M. Varela
Date: Thu, 27 Apr 2000 00:00
37 lines
1201 bytes
No te habia entendido.
Este es el codigo "parcheado": deberia funcionar.

#!/bin/sh
#
echo "Directorio a comprimir: "

while read f
do

  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

  tar \
  --create \
  --sparse \
  --atime-preserve \
  --preserve \
  --file=$TAPE \
  --label=$LABEL \
  --gzip \
  --one-file-system \
  --verbose \
  --totals \
  $f \
  >$LOG.log 2>$LOG.err

  echo "Otro directorio a comprimir (CTRL+D para terminar): "

done

--
------------------------------------------------------------------------
 Victor M. Varela
 Consultor, Integracion de Metodologias y Sistemas, S.L.
 mailto:victor@netims.com
Technical Details
Message-ID: <twig.956853341.99@janeiro.local.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit
X-Google-Thread: f86c8,759a087e068186e1
X-Google-Attributes: gidf86c8,public
From: Victor M. Varela <victor@local.net>
Subject: Re: �c�mo pasarle los datos de un archivo a un script?
Date: 2000/04/27
Message-ID: <twig.956853341.99@janeiro.local.net>
X-Deja-AN: 616405764
Organization: Telefonica Transmision de Datos
Newsgroups: es.comp.os.linux.programacion