BAIT: getkey command

NAME

getkey - extracts values from keyword=value string

SYNOPSIS

getkey [quiet] keyword

DESCRIPTION

getkey reads stdin for a pair key=value and prints out value to stdout and exits with error code 0. If key is not found it prints the message: getkey: keyword key not found and exit with error code 1.

If the quiet option is specified the program does not print an error message if the keyword is not found, but still exits with a code of 1.

If multiple lines are fed into getkey they are processed to stdout with intervening newlines on output.

EXAMPLE

echo done move_sec mils=25.4 | getkey mils produces the output `25.4'.