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:04:15 +0200

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]