5.10.4 Code conversion of the value of a variable
You can convert the code for the value of a shell variable. With this, you can store the variable that is described with UTF-8, execute the code conversion, and use the code within the script.
-
Job definition script described with Shift-JIS (script.ash)
"${ADSH_DIR_CMD}rm" -f outfile.txt while read LINE do adshvarconv -e UTF8 SJIS LINE LINE='Station name='$LINE adshvarconv -e SJIS UTF8 LINE echo -E "$LINE" >>outfile.txt done < input.txt
-
File described with UTF-8 (input.txt)
Tokyo Kyoto
-
Examples
D:\home\user001>adshexec -m MINIMUM script.ash
-
File created with UTF-8 (outfile.txt)
Station name = Tokyo Station name = Kyoto