0

I can read the file, the problem is the insert of the string read in the file in mysql language. I tried to add strings contained into a file to a database (phpmyadmin).

Here is the shell :

apps="/test/list.txt" 

for app in $apps; do  
mysql -utoto -ptiti -h localhost test << EOF 

insert into rpm (applications) values('$app'); 

EOF 

done

The problem is that the result in the database is not the values of the file but the path of the file. Thanks for help...!

AyGitci
  • 3
  • 3
  • possible duplicate of [Bash Scripting & Read File line by line](http://stackoverflow.com/questions/10929453/bash-scripting-read-file-line-by-line) – that other guy Jun 04 '15 at 19:25
  • not a duplicated problem, as I can read the file, the problem is the insert of the string read in the file – AyGitci Jun 05 '15 at 08:11

0 Answers0