bad
unread,Feb 25, 2011, 12:38:16 PM2/25/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenSolaris en español
Buenas tardes,
Al ejecutar el scrip me da un error en la funcion listao.(os paso un
trozo de el , si lo quereis entero os puedo pasar)
En una parte del scrip hago la llamada a la funcion de la siguiente
manera:
if [ $listar = 0 ]
then
#recupero tar
tar cf - $DIR_BACKUP | ssh $USER@$HOST "cd \
$HOST_DIR && tar -xf -"
listao "$HOST,$hosto,$DIR_BACKUP,$HOST_DIR,$USER,
$FICH_TRAZA,$FICH_LISTADO"
# restauro buzon terra
ssh terraing@fs "cd /terra/ffs/bin && ./mgr -s \
$servidor_terra -p 4201 -w \$password2 REPAIR MAILBOX \$usuario@\
$dominio REPAIR=1"
if [ $off = "ok" ]
then
ssh terraing@tfs "/tnet/ffs/bin/mgr -s tfs -p 6212 -
w \$password1 user modify \$usuario \$dominio ENABLEDFLAG=true"
fi
fi
y el codigo de la funcion listao es :
listao ()
{
HOST=$1
hosti=$2
DIR_HOST=$3
DIR_DEST=$4
USER=$5
FICH_LIST=$6 #fichero trazas
FICH=$7 #fichero listado
FICH_DEVOLVER=/tmp/devolver.txt
ssh terraing@HOST "scp \$FICH_LIST hosti:/tmp"
P=0
while read line
do
for i in `grep $line FICH_LIST`
do
if [ $line = "$i" ]
then P=1
fi
done
if [ $P = "1" ]
then
#echo "NO OK $line"
printf "$line\n" >> $FICH_DEVOLVER
tar cfX DIR_HOST $FICH_DEVOLVER - | ssh $USER@$HOSTI "cd \$DIR_DEST &&
tar -xf -"
fi
done < $FICH
}
Me dice :
line 149 : salao command not found.
y es una funcion, alguien me puede ayudar..
Aunque sea un poco abusar si alguien supiera como puedo mandar el
siguiente codigo a traves de ssh sin darme error se lo agradeceria.
ssh $USER@$HOST "
cd $total
if [ test -f $main ]
then
cp main.db main.db.$o
mv main.db.$o /tmp
`$comando_pab/db_dump -f /tmp/main.db.$1
-h $pab main.db.$o`
#recupero tar
#tar "$DIR_BACKUP,$HOST,$USER"
tar cf - $DIR_BACKUP | ssh $USER@$HOST
"cd \$HOST_DIR && tar -xf -"
`$comando_pab/db_load -f /tmp/main.db.o -
h $pab $main`
# restauro buzon terra
ssh terraing@fs "cd /terra/
ffs/bin && ./mgr -s \$servidor_terra -p 4201 -w \$password2 REPAIR
MAILBOX \$usuario@\$dominio REPAIR=1"
else
find . | grep $db >>/tmp/
agendas.txt
while read line5
do
cp $line5 /tmp
done < /tmp/agendas.txt
# recupero tar
tar cf - $DIR_BACKUP | ssh
$USER@$HOST "cd \$HOST_DIR && tar -xf -"
#tar "$DIR_BACKUP,$HOST,
$USER"
`$comando_pab/db_load -f /tmp/
$line5 -h $pab $main`
# # restauro buzon terra
ssh terraing@fs "cd /terra/
fs/bin && ./mgr -s \$servidor_terra -p 4201 -w \$password2 REPAIR
MAILBOX \$usuario@\$dominio REPAIR=1"
if [ $off = "ok" ]
then
ssh terraing@tfs "/tnet/fs/
bin/mgr -s tfs -p 6212 -w \$password1 user modify \$usuario \$dominio
ENABLEDFLAG=true"
fi
fi"