Results 1 to 2 of 2
Thread: Quote a var in a quoted command
Enjoy an ad free experience by logging in. Not a member yet? Register.
Quote a var in a quoted command
I'll do my best to explain my problem in english, I apologize if it's not perfect.
message="Line 1 Line 2 Line 3"
source upload_config.txt curl -s -b cookies -d "form_sent=1&req_message=$message&req_subject=$title&submit=Valider" $edit_url >> temp
This code works, but newline are not created, the output is something like "line 1 line 2 line 3"
I read that the problem is that I have to quote $message in the command, but if I do it, bash don't exec the end of the command.
So I tried
Do the problem is really related with the quote ?
How can I add a newline symbol ?
Looking for idea, thanks !
Just solved the problem.
req_message=`echo -e "$message"`