I have to work with a command (lets call it
update) which somehow prints its output asynchronously to the terminal (
mq_timedsend). The output is not recognized as the commands output and therefore the
stdout of the command is not usable (piping like
update| grep -m 1 "$s" does not work). Unfortunately, I have to life with this.
Invoking the command sooner or later will print
$f as the creators were apparently also not aware of exit codes. I need to be able to parse after
$f and set the exit code manually.
I'm still not very versioned with
bash and all its possibilities. How could a script or even a single chained command which will execute the
update command and will wait until the specific text (
$f) appears in the console look like? Is this even possible?