Insertar datos desde variables de linux
Publicado por Sebastian (4 intervenciones) el 29/02/2016 02:44:01
Buenas noches, estoy queriendo insertar un registro a una base de datos de mariadb pero me tira error:
./take_file.sh: command substitution: line 154: unexpected EOF while looking for matching `)'
./take_file.sh: command substitution: line 179: syntax error: unexpected end of file
lo que quiero insertar es esto:
Gracias
./take_file.sh: command substitution: line 154: unexpected EOF while looking for matching `)'
./take_file.sh: command substitution: line 179: syntax error: unexpected end of file
lo que quiero insertar es esto:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## Insertar los datos en Base de Datos:
#
MARIAINS=`echo $(
mysql db_suivi_prod_tmp -u ${MARIAUSER} -p${MARIAPASSWORD} -e "
INSERT INTO week_suivi(id_application,prd_application,ses_application,name_server,
year_week,number_week,arc_size,full_size,date_full,path_backup
)VALUES(
${MARIAIDAPP}, ## INT(5) --> 1
${MARIAPRD}, ## VARCHAR(5) --> 'PCP'
${MARIASES}, ## VARCHAR(5) --> 'PCP00'
${MARIASERV}, ## VARCHAR(8) --> 'YVKS0090'
${XYEAR}, ## INT(4) --> 2016
${XWEEK}, ## INT(2) --> 01
${XVOLINCR}, ## FLOAT --> 54
${XVOLFULL}, ## FLOAT --> 1067
${XDATEFULL}, ## DATETIME --> '3/01/2016 22:13'
${XPATHLOG} ## VARCHAR(20) --> '/home/e460301/recept/'
);"`;
Gracias
Valora esta pregunta


0