[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pau no case
From: |
Max Leandro Angelo |
Subject: |
pau no case |
Date: |
Tue, 11 Jan 2005 12:00:41 -0300 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Ola,
to usando o case pra fazer a insercao d uma sintaxe em um arquivo...
a script eh a seguinte:
---------------------------------------------
# Chamar funcao usando:
# addpath modulo path
addpath ()
{
case $1 in
zlib) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
libpng) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
libjpeg) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
freetype) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
gd) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
mhash) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
httpd) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
php) cat $dir.installpath | sed "s/:.*$//" >
teste1 ; cat teste1 | sed "s#^$1#$1 : $2#g" > teste ; cat teste >
$dir.installpath;;
esac
}
-----------------------------
ele insere blz, mas quando ele insere, sempre fica somente o ultimo
valor inserido, e os outros saum apagados Sad
o q pode estar errado?
[]'s
--
Max Leandro Angelo
Suporte Tecnico
SoftExpert Quality Software
+55 (47) 2101-9900
http://www.softexpert.com
[As partes desta mensagem que não continham texto foram removidas]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- pau no case,
Max Leandro Angelo <=