Aus der Bash in Mysql
Hallo, ich weiß das es die Diskussion schon mal gab. Jedoch habe ich noch ein bestimmtes Problem. Ich führe folgenden Befehl aus: echo "$datenbank INSERT INTO temp VALUES ('','"$ABSENDER"','"$BETREFF"','"$DATUM"','Ich bin es');" | mysql Der klappt auch wunderbar. Wenn ich jedoch das 'Ich bin es' in 'Ich bin's' (also bestimmte Sonderzeichen benutzte) umändere dann meldet mir mysql einen Fehler. Ich habe schon diverses Probiert wie " oder auch -e (also echo -e) es klappt aber nicht. Ich hoffe das ihr mir weiterhelfen könnt. Bedanke mich schon mal im vor raus! gruss tomek
Hallo Thomas, Thomas Lewandowski schrieb:
Hallo,
ich weiß das es die Diskussion schon mal gab. Jedoch habe ich noch ein bestimmtes Problem. Ich führe folgenden Befehl aus:
echo "$datenbank INSERT INTO temp VALUES ('','"$ABSENDER"','"$BETREFF"','"$DATUM"','Ich bin es');" | mysql
Der klappt auch wunderbar. Wenn ich jedoch das 'Ich bin es' in 'Ich bin's' (also bestimmte Sonderzeichen benutzte) umändere dann
teste mal: 'Ich bin''s' mit 2x '
meldet mir mysql einen Fehler. Ich habe schon diverses Probiert wie " oder auch -e (also echo -e) es klappt aber nicht.
Ich hoffe das ihr mir weiterhelfen könnt. Bedanke mich schon mal im vor raus!
gruss tomek
Grüße Andreas
participants (2)
-
Andreas Ernst
-
Thomas Lewandowski