[lug] Re: [QCLUG] what is the correct script to pipe zcat into xdvi (fwd)
D. Stimits
stimits at idcomm.com
Fri Dec 14 23:13:28 MST 2001
Rob Mohr wrote:
>
> On Fri, Dec 14, 2001 at 08:15:46AM -0700, Rob Mohr wrote:
>
> > I have several files I wish to puruse, such as docstrip.dvi.gz,
> > ltnews04.dvi.gz, and fntguide.dvi.gz and so on. And I want to use zcat to
> > leave them in their current squashed state.
>
> > $ xdvi < zcat docstrip.dvi.gz (this does not work)
>
> The > and < operators specify output or input *files*; specifically,
> this command is going to look for a file in the current directory called
> 'zcat' that it can use as input.
>
> > zcat docstrip.dvi.gz | xdvi (this works so far as to prompt for a
> *.dvi)
>
> The standard mechanism for choosing 'stdin' as your file is to use '-'
> as the filename. So you might try:
>
> $ zcat docstrip.dvi.gz | xdvi - (Note, this yields a "No such file or
> directory" retort. Any other ideas for script? Rob Mohr)
>
> I have no idea if xdvi supports that, though.
>
> Cheers,
> Steve Langasek
> postmodern programmer
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
I would guess that since xdvi might do multiple passes and since the
files are possibly large for buffering, it wants an exact file. It
wouldn't be too hard to rewrite it to accept a piped input with an
option, but it might use a lot of ram. But then again, even 50 MB of ram
is possible nowadays. Basically you'd probably want to give it an extra
command line option to tell it not to consider anything after a double
dash "--" as option, and that if a "--" appears, it means that no file
specification is to be used. I haven't downloaded xdvi source, but if
you have a source rpm, you could easily unpack the source, edit that in
place or create a patch and then add the patch to the spec, and rebuild.
Not exactly a user friendly approach.
D. Stimits, stimits at idcomm.com
More information about the LUG
mailing list