Enviado em 23/07/2017 - 09:32h
Bom dia dificuldade em montar um script básico mas não to conseguindo, objetivo e verificar a versão do Debian e com isso fazer a instalação a partir da versão.
#!/bin/bash
VERSAO=$(lsb_release -c | sed -n '1p' | awk '{print $2}')
echo "$VERSAO"
if [ "$VERSAO == wheezy" ]; then
echo "Instalação Debian 7"
elif [ "$VERSAO == jessie" ]; then
echo "Instalação Debian 8"
elif [ "$VERSAO == stretch" ]; then
echo "Instalação Debian 9"
fi
#!/bin/bash
VERSAO=$(lsb_release -c | sed -n '1p' | awk '{print $2}')
echo "$VERSAO"
if [ "$VERSAO == wheezy" ]; then
echo "Instalação Debian 7"
elif [ "$VERSAO == jessie" ]; then
echo "Instalação Debian 8"
elif [ "$VERSAO == stretch" ]; then
echo "Instalação Debian 9"
fi