ksh: ${foo#'bar'} problem in here-document

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ksh: ${foo#'bar'} problem in here-document

Martijn Dekker
x=notOK
cat <<EOF
1: ${x#not}
2: ${x#\n\o\t}
3: ${x#"not"}
4: ${x#'not'}
EOF

Actual output:

1: OK
2: OK
3: OK
4: notOK

Expected output:

1: OK
2: OK
3: OK
4: OK

Same bug exists with ##, % and %%.

Thanks,

- M.