Article View: es.comp.os.linux.programacion
Article #7934Shell script :: sh
From: JMO
Date: Tue, 21 Jan 2003 14:58
Date: Tue, 21 Jan 2003 14:58
37 lines
1554 bytes
1554 bytes
Hola Gentes!
Tengo un problema de sustituci�n:
Vean... mi script intenta hacer esto:
#! /bin/sh
BASES="www sss eee"
HOME_www=/usr/seda
BASE_www=www
OPS_www="-L 10000 -n 2"
for i in $BASES
do
rm -f $HOME_$i/$i.lk
done
# End Script
El problema esta en el rm, trato de construir la variable $HOME_www; etc..
con $HOME_$i y luego usar su valor
para borar el archivo /usr/seda/www.lk
He probado mil variantes, pero ninguna funciono.
Esta que paresia factible, murio:
rm -f `echo "\${HOME_$i}"/$i.lk` lo que me daria => rm -f
${HOME_www}/www.lk # pero no funca!!
Alguna ayuda!
Desde ya gracias a todos... muy bueno el hilo con el asunto "Leer un
fichero" que comenzo DK a principios de a�o!!!
Mario
Technical Details
Message-ID:
<b0jn6v$pgd6k$1@ID-163214.news.dfncis.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!200.32.16.110!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,6e0e721f37e4bc2f,start X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2003-01-21 06:58:41 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!200.32.16.110!not-for-mail From: "JMO" <jmoroz@uol.com.ar> Newsgroups: es.comp.os.linux.programacion Subject: Shell script :: sh Date: Tue, 21 Jan 2003 11:58:36 -0300 Organization: JMO Lines: 39 Message-ID: <b0jn6v$pgd6k$1@ID-163214.news.dfncis.de> NNTP-Posting-Host: 200.32.16.110 X-Trace: fu-berlin.de 1043161120 26752212 200.32.16.110 (16 [163214]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106