So che quando sto per fare una bella figurina che solo io so fare, però proprio non riesco a capire come diavolo togliere questo stupidissimo errore![]()
Non riesco neanche a creare un array
![]()
Direttamente dalla guida Adavanced bash scripting:
http://tldp.org/LDP/abs/html/arrays.html
Questa invece è la mia versione... praticamente identica:
#!/bin/bash
tabelle[1]=ciao
for t in ${tabelle[@]:0}
do
echo "CREATE TABLE \`t\` ( \
\`id\` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , \n \
\`nome\` VARCHAR( 50 ) NOT NULL , \n \
\`sito\` VARCHAR( 50 ) NOT NULL , \n \
\`voto\` TINYINT NULL , \n \
\`testo\` LONGTEXT NOT NULL \n \
) ENGINE = MYISAM ; \n" >> listabs
done
simone@dualcore:~/script$ sh script_mysql
script_mysql: 4: tabelle[1]=ciao: not found
script_mysql: 6: Syntax error: Bad substitution
simone@dualcore:~/script$
Che diavolo è che non va? ho provato anche con tabelle[1]="ciao" ma niente da fare...



Rispondi quotando
