Learn Tiny Core. View Tiny Core Screen Shots and Videos.
string="jklö"echo $stringecho ${#string}
tc@tinycore:~$ test=bépotc@tinycore:~$ echo $testbépotc@tinycore:~$ echo ${#test}4
tc@box:~$ ls -l `which sh`lrwxrwxrwx 1 root root 7 Nov 16 2011 /bin/sh -> busyboxtc@box:~$ ./zjklö4tc@box:~$
function readchars() { local var= local tmp= read -s -n 1 tmp while [ -n "$tmp" ]; do printf "$tmp" var="$var$tmp" read -s -n 1 tmp done eval $1=\""$(sed 's#["$]#\\\0#g' <<<"$var")"\"}
#! /bin/busybox ashstring="jklö"echo $stringecho ${#string}
#! /bin/busybox ashCSI=$'x1b['readchars(){ local var= local tmp= read -n 1 tmp while [ -n "$tmp" ]; do printf "$tmp" var="$var$tmp" read -n 1 tmp done}echo -n "${CSI}48;5H" # substitute 48 with your last line numberecho -n "input: "RESULT=$(readchars)echo -n "${CSI}12;5H"echo -n "output: $RESULT"read -s -n 1 dummy
function readchars() { local var= local tmp= read -s -n 1 tmp while [ -n "$tmp" ]; do printf "$tmp" var="$var$tmp" read -s -n 1 tmp done echo "$var"}test_variable="$(readchars)"