Skip to content

Instantly share code, notes, and snippets.

@edusantana
Last active July 28, 2019 20:10
Show Gist options
  • Save edusantana/b9ec100c4ab1c6e21bf51310ed697c0c to your computer and use it in GitHub Desktop.
Save edusantana/b9ec100c4ab1c6e21bf51310ed697c0c to your computer and use it in GitHub Desktop.
#!/bin/bash
nome=$(zenity --entry --text="Qual seu primeiro nome?" --entry-text="Nome")
sobrenome=$(zenity --entry --text="Qual seu sobrenome?" --entry-text="Nome")
altura=$(zenity --scale --value=160 --max-value=200 --text="Qual a sua altura?")
#peso=$(zenity --scale --value=60 --max-value=200 --text="Qual a seu peso?")
STRING=$(echo $nome | cal | head -n 1 | tr -d '[:space:]' | cut -f 2 -d 0)
tmpfile=$(mktemp)
echo $STRING >> $tmpfile
#echo "Altura informada: $altura " >> $tmpfile
echo "sobrenome informado: $sobrenome" >> $tmpfile
echo "Nome informado: $nome" >> $tmpfile
tac $tmpfile
rm "$tmpfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment