Enviado em 27/08/2017 - 09:25h
Bom dia gostaria de estar adicionando uma linha em branco no arquivo de configuração especifico tipo paragrafo 30 no echo ele sempre vai pro final do arquivo terial alguma forma de especificar a linha a adicionar ???.
Enviado em 27/08/2017 - 09:25h
Enviado em 27/08/2017 - 13:22h
sed -i '30i\host Suporte {\nallow client-updates;\nallow unknown-clients;\nhardware ethernet 48:2f:15:6d:1c:ee;\nfixed-address 142.18.31.23;\n}' /etc/dhcpd.conf Enviado em 27/08/2017 - 09:34h
sed 's/^\t/\n&/g'
sed 's/^[A-Z]/\n&/g'
Enviado em 27/08/2017 - 09:46h
Enviado em 27/08/2017 - 09:51h
sed -i 's/^[A-Z]/\n&/g' file.txt
Enviado em 27/08/2017 - 10:02h
Enviado em 27/08/2017 - 11:22h
sed -i '3 a\novo texto' arquivo.foo
Enviado em 27/08/2017 - 12:04h
Enviado em 27/08/2017 - 14:46h
#!/bin/bash
NOVO=Suporte
MAC=48:2f:15:6d:1c:ee
IP=142.18.31.23
CONF="host ${NOVO} {\n\tallow client-updates;\n\tallow unknown-clients;\n\thardware ethernet ${MAC};\n\tfixed-address ${IP};\n}";
sed -i "29 a ${CONF}" /etc/dhcp.conf
Enviado em 27/08/2017 - 18:03h
#!/bin/bash
NOVO=Suporte
MAC=48:2f:15:6d:1c:ee
IP=142.18.31.23
CONF="host ${NOVO} {\n\tallow client-updates;\n\tallow unknown-clients;\n\thardware ethernet ${MAC};\n\tfixed-address ${IP};\n}";
sed -i "29 a ${CONF}" /etc/dhcp.conf
sed -i "30 i ${CONF}" /etc/dhcp.conf Entre na sua conta para responder.