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;;
Was it helpful?

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top