I have a bash script where I define UTF-8 Greek Symbols in a file named greek-utfb.sh. I want to run tests that display the variables for printing the greek letters in the file greek-utfb-scout.
--- greek-utfb.sh ----
utfb-greek ()
{
Alph="\u0391" # Alpha
Beta="\u0392" # Beta
Gamm="\u0393" # Gamma
Delt="\u0394" # Delta
Epsi="\u0395" # Epsilon
}
--- greek-utfb-scout.sh ---
greek-utf-scout ()
{
echo -e "Alph: $Alph"
echo -e "Beta: $Beta"
echo -e "Gamm: $Gamm"
echo -e "Delt: $Delt"
echo -e "Epsi: $Epsi"
}
What do I have to add in greek-utfb-scout.sh to be able to translate the greek variables in greek-utfb.sh.
sourceand.builtins are synonyms in Bash;.is the portable one. If the shebang of the "calling" script is#!/bin/shthen you should use.. +1 anyway because sourcing is the answer. – Kamil Maciorowski Aug 12 '21 at 10:04.instead. – Panki Aug 12 '21 at 10:40unset Alphto clear the$Alphvariable. – Panki Aug 12 '21 at 11:31