Domanda

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;;
È stato utile?

Soluzione 2

You could try this.

echo "Please enter a name for your addressbook"
                        read addName
                        touch $addName.txt

                break;;

for a text file.

Altri suggerimenti

read addName vs. $addname The names are not the same (uppercase n vs. lowercase n)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top