[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH nbdkit v3 3/3] retry: Add a test of this filter.



On Thu, Sep 19, 2019 at 11:12:23AM -0500, Eric Blake wrote:
> > +    open)
> > +        # Count how many times the connection is (re-)opened.
> > +        i=`cat retry-reopen-fail-open-count`
> 
> $() is nicer than ``, but even better is just:
> 
> read i retry-reopen-fail-open-count

Did you mean:

read i < retry-reopen-fail-open-count

Unfortunately it fails when the file does not exist.  (We could
pre-create the files though).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]