Groups
Groups
Sign in
Groups
Groups
Linux Install Fest
Conversations
About
Send feedback
Help
Dúvida com Shell Script
1 view
Skip to first unread message
Henrique Fagundes
unread,
May 16, 2016, 4:59:27 PM
5/16/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to debian-user-portuguese, Henrique Fagundes
Amigos,
Saudações pinguianas.
Estou com uma dúvida em um Shell.
Vejam:
#!/bin/bash
for dominios in `cat /root/dominios.txt | egrep -v "^[#;]" `; do
sed -i '33i\blacklist_from *$dominios\' /opt/zimbra/conf/
salocal.cf.in
done
Dentro do arquivo "/root/dominios.txt" tem o seguinte conteúdo:
teste.com.br
Então, era para o script fazer o seguinte: Adicionar a linha
"blacklist_from *
teste.com.br
" na linha 33 do arquivo
/opt/zimbra/conf/
salocal.cf.in
.
Só que isso não está acontecendo! Ao invés disso, ele está adicionando a
linha "blacklist_from *$dominios".
Alguém sabe como eu posso fazer para forçar o script a interpretar a
variável?
Desde já muito grato.
Atenciosamente,
Henrique Fagundes
henr...@linuxadmin.com.br
Skype: magnata-br-rj
Linux User: 475399
http://www.aprendendolinux.com/
http://www.facebook.com/PortalAprendendoLinux
http://youtube.com/aprendendolinux/
http://twitter.com/aprendendolinux/
______________________________________________________________________
Participe do Grupo Aprendendo Linux
https://groups.google.com/forum/#!forum/portal-aprendendo-linux
Ou envie um e-mail para:
portal-aprendend...@googlegroups.com
Henrique Fagundes
unread,
May 16, 2016, 5:01:32 PM
5/16/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Henrique Fagundes
Reply all
Reply to author
Forward
0 new messages