Hi Victor,

Hope life's treating you well since you moved ‘abroad’.

Patrick wrote:
> > > (yada yada) |& curl -sSF 'f:1=<-' ix.io
> >
> > I was puzzled to see the '&' in your command above.

Patrick's answered that ‘|&’ is a bash shorthand for ‘2>&1 |’.

> > I'd have thought that saying
> >     (yada yada) | curl -sSF 'f:1=<-' ix.io
> > would do the trick

If the sub-shell in parenthesis produced any stderr for Clive, which
would probably be interesting to us, then it would appear on his TTY and
not be piped to curl so we see it.  Redirecting stderr to the same place
as stdout, the pipe, avoids this.

> In bash(1), |& is one operator, not two.

bash also adds ‘&>foo’ meaning ‘>foo 2>&1’.  Likewise ‘&>>’.

-- 
Cheers, Ralph.

-- 
  Next meeting: BEC, Bournemouth, Tuesday, 2019-08-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to