help-bash
[Top][All Lists]
Advanced

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

Re: Send command to printer


From: Tapani Tarvainen
Subject: Re: Send command to printer
Date: Sat, 21 Aug 2021 19:20:32 +0300

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]