help-bash
[Top][All Lists]
Advanced

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

Re: Send command to printer


From: tooth pik
Subject: Re: Send command to printer
Date: Sat, 21 Aug 2021 15:08:50 -0500

i've had good luck with the enscript command, but i don't remember
if it came with my OS or i had to install it

On Sat, Aug 21, 2021 at 3:04 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
wrote:

> just find a cmd that prints its stdin in realtime, the rest then is easy
>
> On Sat, Aug 21, 2021, 21:21 Julius Hamilton <julkhami@gmail.com> wrote:
>
> > Thank you very much.
> >
> > I will read up on the script command.
> >
> > I would like it to be printed in real time.
> >
> > Is there any way to avoid piping it into a print command every time? Can
> I
> > write in a bashrc file that every command is to have a certain pipe
> command
> > appended to the end of it?
> >
> > Thanks very much,
> > Julius
> >
> > On Sat, Aug 21, 2021, 18:20 Tapani Tarvainen <bash@tapanitarvainen.fi>
> > wrote:
> >
> > > On Sat, Aug 21, 2021 at 03:06:57PM +0200, Julius Hamilton (
> > > julkhami@gmail.com) wrote:
> > >
> > > > Is it possible for me to edit my bashrc file or configure bash in
> some
> > > way
> > > > to always echo the command entered back to stdout?
> > >
> > > set -x
> > >
> > > although it does add '+ ' to the beginning of inputs.
> > >
> > > > Also, what is the simplest way to configure bash to send all stdout
> > > > to a printer?
> > >
> > > That would depend on how the printer has been set up in the first
> place.
> > >
> > > If collecting it to a file that can be printed later is enough, try
> > > this:
> > >
> > > exec > >(tee -i file)
> > >
> > > If you need it printed in real time, you could replace file
> > > there with a named pipe and have a printing program read it.
> > >
> > > You could also consider if the "script" command would work
> > > for your purpose.
> > >
> > > --
> > > Tapani Tarvainen
> > >
> > >
> >
>


reply via email to

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