#!/bin/sh while [[ -z $r ]] do r=$(cat /tmp/zx); done echo $r