[PLUG-Devel] busybox ash shell pause command?

der.hans PLUG at LuftHans.com
Sat Nov 1 20:31:36 MST 2008


Am 01. Nov, 2008 schwätzte Alan Dayley so:

> I have a script running in a busybox ash shell.  I want the script to
> display a message (echo) and then pause for the user to press a key on
> the terminal.  I can't seem to find the right command to do this.  A
> couple of sites suggest something with the read command like:
>
> read -p "Press a key"
>
> or
>
> read -p "$*"

Are you getting an error?

read: 5: arg count

You need to specify a variable that will get the user input.

I just installed ash and verified with that as well, but that's a link to
dash in debian and Ubuntu.

> But neither of the above result in a pause.  The read command goes
> merrily reading nothing and the script moves on.
>
> Any other ideas from out there?

A sleep would be inelegant, but should work.

ciao,

der.hans
-- 
#  http://www.LuftHans.com/        http://www.LuftHans.com/Classes/
#  C'est la Net - der.hans


More information about the PLUG-devel mailing list