shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [shell-script] duvida com if


From: Reinaldo Marques de Lima
Subject: RE: [shell-script] duvida com if
Date: Fri, 19 May 2006 18:48:24 +0000


tenta assim:

if [ ! $VARIAVEL ]; then

blablabla

fi

[]'s

############################################################
Reinaldo
Linux User : 406967
Emails:
echo 'reimlima''.com' | sed 's/\(reimlima\)\(.com\)/\n\1@hotmail\2\n\1@yahoo\2.br\n\1@gmail\2\n/'

echo 1818051527984510780893780664296243491354600493300713506724768535179018P | dc
############################################################




From: "  " <address@hidden>
Reply-To: address@hidden
To: address@hidden
Subject: [shell-script] duvida com if
Date: Fri, 19 May 2006 15:43:57 -0300

Boa tarde,

Pessoal alguem pode me ajudar com esse script:

#/bin/bash

diretorio=/home/servidor/
excluidos= mp3 videos fotos <-- isso seria nome de diretorios

for DIRETORIOS in `ls -l $diretorio | grep "^d"  | awk '{print $8}'`; do
if not $DIRETORIOS in $excluidos then <-- como fazer isso em schell script tar -jcv "$diretorio""$DIRETORIOS" -f /root/backup_$DIRETORIOS.tar.bz2
done


grato




reply via email to

[Prev in Thread] Current Thread [Next in Thread]