help-bash
[Top][All Lists]
Advanced

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

Re: Send command to printer


From: Alex fxmbsw7 Ratchev
Subject: Re: Send command to printer
Date: Sat, 21 Aug 2021 22:26:22 +0200

just a small input by me regarding bashrc
you can exec stdin and stderr to a file or fifo havent thought much, and
read that file in terminal, while also sending it to the printer

On Sat, Aug 21, 2021, 22:23 Tapani Tarvainen <bash@tapanitarvainen.fi>
wrote:

> On Sat, Aug 21, 2021 at 09:19:53PM +0200, Julius Hamilton (
> julkhami@gmail.com) wrote:
>
> > I would like it to be printed in real time.
>
> At this point we'd need to know more about the printer in question,
> how it's connected &c. Printing the lines (or characters) as soon as
> they occur is not really possible with normal print spoolers, but if
> you can send data directly to the printer device or have a custom
> program for printing, then it may be possible (depending on the
> printer - page printers like lasers obviously can't do it).
>
> > Is there any way to avoid piping it into a print command every time?
>
> If you want printing in real time (whatever that actually means here,
> maybe a character or a line at a time), you'll have to send the stuff
> to be printed in real time as well. You may not need to use a pipe
> or a regular print command though, but you have to send the stuff
> to something, somehow, at least as fast as you want them printed.
>
> > Can I write in a bashrc file that every command is to have a certain
> > pipe command appended to the end of it?
>
> Not quite that way, I think, although the exec command I suggested
> could be used with somewhat similar effect (piping stdout of each line
> to a command). I'm not sure it'd be useful for your purposes, however.
>
> By the way, if your intent is to print the terminal session as it
> appears to the user on the terminal, you should print stderr as well.
>
> --
> Tapani Tarvainen
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]