Enviado em 24/07/2019 - 09:11h
Bom dia/tarde/noite/madrugada!
OSChooseOptions=()
local OSServerCount=0
# Save the old Internal Field Separator in a variable
OIFS=$IFS
# and set the new one to newline
IFS=$'\n'
# Put the DNS Servers into an array
for OS in ${OSTYPE}
do
TYPE="$(cut -d':' -f2 <<< "${OS}")"
OSChooseOptions[OSServerCount]="${TYPE}"
(( OSServerCount=OSServerCount+1 ))
OSChooseOptions[OSServerCount]=""
(( OSServerCount=OSServerCount+1 ))
done
OSChooseOptions[OSServerCount]="Custom"
(( OSServerCount=OSServerCount+1 ))
OSChooseOptions[OSServerCount]=""
# Restore the IFS to what it was
IFS=${OIFS}
# In a whiptail dialog, show the options
OSchoices=$(whiptail --separate-output --menu "Selecione o Tipo de OS." ${r} ${c}$
"${OSChooseOptions[@]}" 2>&1 >/dev/tty) || \
# exit if Cancel is selected
{ printf " %bCancel was selected, exiting installer%b\\n" ; exit 1; }
Aprenda a Gerenciar Permissões de Arquivos no Linux
Como transformar um áudio em vídeo com efeito de forma de onda (wave form)
Como aprovar Pull Requests em seu repositório Github via linha de comando
Mantenha seu Sistema Leve e Rápido com a Limpeza do APT!
Procurando vídeos de YouTube pelo terminal e assistindo via mpv (2025)
Gravação de tela com temporizador
Eu tive esse erro aqui depois de de baixar o HyprLand Ubuntu na versão... (1)
Como fazer boot em img do debian 12.img da web? (11)
Manjaro 25.0 no permite usar crontab (1)