Hi,
I tried to use
Looks like FreeBSD doesn't like the
Any ideas?
Thanks!
> Options
> ...
> -n nchars return after reading NCHARS characters rather than waiting
> for a newline, but honor a delimiter if fewer than
> NCHARS characters are read before the delimiter
I tried to use
read -n
to cleanly break out of a while loop (see code below).Looks like FreeBSD doesn't like the
-n
option.Any ideas?
Thanks!
> Options
> ...
> -n nchars return after reading NCHARS characters rather than waiting
> for a newline, but honor a delimiter if fewer than
> NCHARS characters are read before the delimiter
Code:
while true
do
aa=`sysctl hw.acpi.thermal.tz0.temperature | awk 'BEGIN{FS="[ C]"}{ print $2 } ' `
echo "$aa"
read -n 1 -r -t 2 -p "Press Any Key to Quit" bbb
if [ ! -z $bbb ]
break
fi
done