checkzone from stdin?
matt at conundrum.com
Wed Apr 8 20:11:43 UTC 2020
On Wed, 8 Apr 2020 at 15:55, Anand Buddhdev <anandb at 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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bind-users