sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

D0589.test-printf-uXXXX.sh (431B)


      1 #!/bin/bash
      2 
      3 function test1 {
      4   var=123
      5   printf -v var '\u222E'
      6   echo "printf1: ext=$ext #var=${#var} var='$var'"
      7   printf -v var '\u3042'
      8   echo "printf2: ext=$ext #var=${#var} var='$var'"
      9 
     10   eval "var=\$'\u222E'"
     11   echo "esc1: ext=$ext #var=${#var} var='$var'"
     12   eval "var=\$'\u3042'"
     13   echo "esc2: ext=$ext #var=${#var} var='$var'"
     14 }
     15 
     16 echo LANG=ja_JP.UTF-8
     17 LANG=ja_JP.UTF-8
     18 test1
     19 
     20 echo LANG=ja_JP.eucJP
     21 LANG=ja_JP.eucJP
     22 test1