NAME

ok - a y/n interrogator

SYNOPSIS

ok [time=] [prompt]

DESCRIPTION

When used without arguments ok prints the prompt `ok (y/n): ` to stdout and waits for the user to enter a character followed by a line feed. If the character is `y' then the program exits with a code of 0; any other string (including enter alone) will generate an exit code of 1.

If a message is specified, it is printed to stdout (without carriage return) and the program awaits input as above.

If an optional time= is specified, the mode is a bit different: the prompt is again printed out, but it will wait for a key stroke which should be a 1, 2 .. and then exit with that code. If no keystroke is received in the time specified (seoonds), the program will exit with a zero status code.


Program index