Created
September 22, 2015 06:58
-
-
Save rpherrera/3593e9e25ca3e9e667f9 to your computer and use it in GitHub Desktop.
exercicio anotacoes - secomp ufscar 2015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
read -p "Informe alguma palavra a ser buscada nas anotacoes: " busca | |
echo "Buscando resultados..." | |
grep -i ${busca} anotacoes.txt | |
if [ $? -ne 0 ]; then | |
echo "Infelizmente, sua busca nao retornou resultados..." | |
fi | |
sleep 3 | |
clear | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
read -p "Informe a Anotacao que Deseja Registrar: " anotacao | |
echo "Anotacao Recebida: '${anotacao}'." | |
echo "Gravando Anotacao em 'anotacoes.txt'..." | |
echo ${anotacao} >>anotacoes.txt | |
echo "Processo Finalizado. Saindo em 3 segundos." | |
sleep 3 | |
clear | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment