You could try this.
echo "Please enter a name for your addressbook"
read addName
touch $addName.txt
break;;
for a text file.
Question
Hello i am creating a simple case statement menu to implement an address book and i am having trouble.
the menu work fine but i am having trouble understanding why the file is not created through this command.
this is just primary testing to see if a file is created but is is giving me an operand error so i tried adding .txt to the end and it gave no feedback.
1) echo "Please enter a name for your addressbook"
read addName
touch $addname
break;;
Solution 2
You could try this.
echo "Please enter a name for your addressbook"
read addName
touch $addName.txt
break;;
for a text file.
OTHER TIPS
read addName
vs. $addname
The names are not the same (uppercase n vs. lowercase n)