http://landley.net/mantis/mantis-2924.html
Quote:
The shell construct:
${varname:begin:end} does not produce the substring of $varname starting at begin and going to end.
example:
#!/bin/ash
mystr="This is a string"
echo $mystr
mysubstr=${mystr:0:4}
echo $mysubstr
#end of example
Expected output:
This is a string
This
Actual output:
This is a string
./testscript: line 5: syntax error: Bad substitution
|
thought it looked familiar
so
Quote:
if [[ \" = ${x:0:1} ]]; then
|
is just trimming the first char for a test? perhaps I can bodge that another way
EDIT:
Quote:
if [[ \" = $( `echo $x | awk '{print substr ($0, 0, 1)}'` ) ]]; then
|
maybe??