Quote:
Originally Posted by twobob
so
is just trimming the first char for a test? perhaps I can bodge that another way
EDIT:
Code:
if [[ \" = $( `echo $x | awk '{print substr ($0, 0, 1)}'` ) ]]; then
maybe??
|
You can probably try with head as well:
Code:
if [[ \" = $( `echo $x | head -c 1` ) ]]; then
Might be faster than calling awk? Combined with tail, you could get any substring out. Like:
Code:
echo $x | head -c 3 | tail -c 2
And my bad, it is indeed what you thought initially - the substring handling is the part that it does not like. Busybox must have extended the shell to be somewhat more bash like in later versions.