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

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

Re: [shell-script] Re: Duvida para atribuir valor a variavel


From: Raul Libório
Subject: Re: [shell-script] Re: Duvida para atribuir valor a variavel
Date: Sat, 9 Jul 2016 21:15:08 -0300


2016-07-09 20:21 GMT-03:00 Rodrigo Cunha address@hidden [shell-script] <address@hidden>:
mysqldump -h localhost -uteste -psenha --opt teste > teste.bkp$DATE

Você declarou a variável DATA, mas aqui chama DATE. Tem essas duas variáveis mesmo?

Outra coisa, dando meu pitaco também :)
Eu costumo expandir as variáveis usando chaves, como por exemplo, ${DATA}. Acho mais seguro, porque fica bem explícito que é apenas aquele valor que está dentro das chaves.

Raul Libório
http://rauhmaru.blogspot.com/
openSUSE Member | Linux User #4444581

/etc/httpd/conf.d/ssl.conf:7
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.

reply via email to

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