Enviado em 04/09/2015 - 21:57h
Pessoal, boa noite.
Sou iniciante em shell script e estou me enrolando em criar um script que guarde em um arquivo de texto (ex: agenda.txt), um cadastro de nome e telefone adicionados ao stdin, usando o "read -p"
#!/bin/bash
read -p "Digite seu nome:" $nome
read -p "Digite seu telefone:" $telefone
echo $nome $telefone >> agenda.txt
Sou iniciante em shell script e estou me enrolando em criar um script que guarde em um arquivo de texto (ex: agenda.txt), um cadastro de nome e telefone adicionados ao stdin, usando o "read -p"
#!/bin/bash
read -p "Digite seu nome:" $nome
read -p "Digite seu telefone:" $telefone
echo $nome $telefone >> agenda.txt