read a single pushed key by a dash script

Ralf Mardorf silver.bullet at zoho.com
Sun Nov 6 13:25:23 UTC 2016


Hi,

since some script experts are online at the moment, does anybody know a
more neat solution, than using bash's read in a dash script?

  bash -c "read -n1 answer"

Btw. I'm using this for a script that could run as dash and bash
script, it's just that dash is faster. It doesn't matter for this
script at the moment, but you never know, speed could become an issue.

Regards,
Ralf





More information about the ubuntu-users mailing list