Article 4ZBPJ typing or pasting Greek characters in a bash script

typing or pasting Greek characters in a bash script

by
aristosv
from LinuxQuestions.org on (#4ZBPJ)
I am using a bash script to send SMS messages using an SMS gateway. The script is something like this:

Code:msg="this is a test"

while read phone; do
echo
echo working on "$phone"
curl -s -S -k --data-urlencode "msg=$msg" "$api?username=$username&userid=$userid&handle=$handle&from=$from&to=$prefix$phone"
done < numbersI want to replace the $msg value with Greek characters, like this:

Code:msg="II...II(R) IIIII^1 I1/4I^1I IIII^1I1/4I(R)"When I try to type the Greek text in the bash script, I just get spaces or tabs and no characters appear. I can't even copy the Greek text from a notepad in Windows and paste it in the bash script.

I'm guessing it has something to do with encoding, but I couldn't find a way to do this. Any suggestions?latest?d=yIl2AUoC8zA latest?i=nF3gGb0kOIM:4HdXV5rPbSE:F7zBnMy latest?i=nF3gGb0kOIM:4HdXV5rPbSE:V_sGLiP latest?d=qj6IDK7rITs latest?i=nF3gGb0kOIM:4HdXV5rPbSE:gIN9vFwnF3gGb0kOIM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments