On Wed, 8 Apr 2020 at 15:55, Anand Buddhdev <ana...@ripe.net> wrote:

> Note that it would work with "cat file | ..." but I absolutely hate the
> cat-pipe combination. I've been known to mark down interviewees who
> offer a solution that involves cats and pipes :)
>

That was just a minimal example to demonstrate the limitation.   But yes,
cat and pipe together in the wild only makes sense if the target of the
pipe can *only* take data via stdin, and can't accept a file name on its
command line.

What I'm actually doing is running a bit of code that detects whether a
zone file is compressed or not, and by which compression algorithm if it
is, selects the correct "open()" function depending on the results, and
then reads the file in from that (possibly compressed) file-like object and
feeds it into named-checkzone's stdin.

I like your suggestion of using /dev/stdin as the file though.. I bet I can
make that work until 9.18 is out.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to