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?


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?