This does what I want:
--8<---cut here---start->8---
_tee_stderr ()
{
<<'eohd'
SYNOPSIS
ourname
DESCRIPTION
Use in a pipe. Leaks STDIN to STDERR. Passes STDIN to STDOUT unchanged.
EXAMPLE
$ seq 5 |_tee_stderr
> On Jul 3, 2020, at 10:32 AM, bug-b...@trodman.com wrote:
>
> This does what I want:
>
> --8<---cut here---start->8---
> _tee_stderr ()
> {
> <<'eohd'
>SYNOPSIS
>
>ourname
>
>DESCRIPTION
>
>Use in a pipe. Leaks STDIN to S
I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no
parameters given to function.
Tested in a bash script 'exit $((!$#)) / $[!$#]' - both work.
'echo $((!$#)) / $[!$#]' - both echo 1 when no params, 0 when any
number of params.
I'm told ( https://wiki.bash-hackers.org/s
> On Jul 3, 2020, at 2:00 PM, Chris Elvidge wrote:
>
> However 'N=0; echo $((!$N))' gives an error at the bash prompt.
> 'echo $[!$N]' echo's 1 as expected.
>
> My question - is $[...] actually obsolete?
It might tell you something that $[...] is not even mentioned in
the man page for bash 3.2.
On 7/3/20 2:00 PM, Chris Elvidge wrote:
> I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no
> parameters given to function.
>
> Tested in a bash script 'exit $((!$#)) / $[!$#]' - both work.
>
> 'echo $((!$#)) / $[!$#]' - both echo 1 when no params, 0 when any
> number of p