Groups | Search | Server Info | Login | Register


Groups > alt.os.linux.mint > #47401

Re: echo does not display from bash script

From pinnerite <pinnerite@gmail.com>
Newsgroups alt.os.linux.mint
Subject Re: echo does not display from bash script
Date 2026-05-05 21:39 +0100
Organization A noiseless patient Spider
Message-ID <20260505213924.cc6ee6c22ec40fc47437ecda@gmail.com> (permalink)
References <20260502201304.8dd1eeb5073cc5422b0fdc8a@gmail.com> <10t5v4u$2gf4u$1@dont-email.me> <10t7ddk$2segc$1@dont-email.me>

Show all headers | View raw


On Sun, 3 May 2026 13:00:51 +0100
Mark Bourne <nntp.mbourne@spamgourmet.com> wrote:

> Paul wrote:
> > Let us work with this one.
> > 
> >     somecommand >> "$LOGFILE" 2>&1
> > 
> > That says to redirect "stderr" to "stdout",
> > then redirect "stdout" additively to the $LOGFILE.
> > Nowhere does it mention anything about also
> > including a copy on Alans Screen :-)
> > 
> > How about if we try this ?
> > 
> >     somecommand 2>&1 | tee >> "$LOGFILE"
> 
> I think you need:
> 
>      somecommand 2>&1 | tee --append "$LOGFILE"
> 
> Otherwise you're redirecting the copy that tee sends to stdout to the 
> file instead (so you still won't get any output on the terminal), and 
> not giving tee any files to copy it to.
> 
> --
> Mark.

I rebuilt the 13 year-old machine and while doing it the penny droped.
The existing data data isbeing copied from the hard drive to the NVMe
as I write. Once the teething problems are over, I will bring up some
quick and dirty scripts to just grubby.

Thank you for your help.
Alan

-- 
Linux Mint 22.1 kernel version 6.8.0-84-generic Cinnamon 6.4.8
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 2TB SSD, 2TB Barracuda

Back to alt.os.linux.mint | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

echo does not display from bash script pinnerite <pinnerite@gmail.com> - 2026-05-02 20:13 +0100
  Re: echo does not display from bash script "Alan K." <alan@invalid.com> - 2026-05-02 18:21 -0400
    Re: echo does not display from bash script "Alan K." <alan@invalid.com> - 2026-05-02 18:24 -0400
  Re: echo does not display from bash script Paul <nospam@needed.invalid> - 2026-05-02 18:51 -0400
    Re: echo does not display from bash script Mark Bourne <nntp.mbourne@spamgourmet.com> - 2026-05-03 13:00 +0100
      Re: echo does not display from bash script pinnerite <pinnerite@gmail.com> - 2026-05-05 21:39 +0100
  Re: echo does not display from bash script Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-02 23:00 +0000

csiph-web