How come tail coreutil cannot work as its input is from tee
$ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tail -1
1
But :
$ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tee >(head -1) |tail -1
9
Please help explain
if u d try echo .. | tee >( >/dev/null ) | tail -1
i havent tested, but im trying to say, the stdout by head seems to be taken
i mean heads stdout prioritizes
im not sure.. ppl ( that know .. ) .. write about it :)
-- Forwarded message -
From: Budi
Date: Mon, Sep 6, 2021, 09:38
Su
On Mon, Sep 06, 2021 at 07:38:03AM +, Budi wrote:
> How come tail coreutil cannot work as its input is from tee
>
> $ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tail -1
> 1
>
> But :
>
> $ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tee >(head -1) |tail -1
> 9
>
> Please help explain
Not a bug.
If you leave
Because your last pipe will pipe BOTH output of `echo` AND `head` with
delay due to fork, head output will comme after. try this:
echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tee >(head -1 >&2) |tail -1
or
echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tee >(head -1 >&2) >(tail -1 >&2) >/dev/null
...
On Mon, Sep
On Mon, Sep 06, 2021 at 07:38:03AM +, Budi wrote:
> How come tail coreutil cannot work as its input is from tee
>
> $ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tail -1
> 1
>
> But :
>
> $ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tee >(head -1) |tail -1
> 9
>
> Please help explain
I don't see how this is
On Mon, Sep 06, 2021 at 08:41:33AM +0200, Alex fxmbsw7 Ratchev wrote:
> btw in the help you pasted there is the -a arr in question
Can you for the love of glob please STOP top-posting?
> On Mon, Sep 6, 2021, 08:36 felix wrote:
> > It would be nice if builtins intended to produce *answer* use mor
thanks sorry ill try other mail clients somewhen..
i suppose he tries like me to save the cpu for speed
measure 1k $( : ) .. i not but i suppose last time the nothingly difference
was big
On Mon, Sep 6, 2021, 14:11 Greg Wooledge wrote:
> On Mon, Sep 06, 2021 at 08:41:33AM +0200, Alex fxmbsw7 R
On Mon, Sep 06, 2021 at 07:38:03AM +, Budi wrote:
> How come tail coreutil cannot work as its input is from tee
>
> $ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tail -1
> 1
>
> But :
>
> $ echo -e '9\n4\n3\n2\n8\n7\n3\n1' |tee >(head -1) |tail -1
> 9
>
> Please help explain
It would be better if yo
On Mon, Sep 06, 2021 at 08:11:20AM -0400, Greg Wooledge wrote:
> The real one looks like this:
> unicorn:~$ help realpath
> realpath: realpath [-csv] pathname [pathname...]
> Display pathname in canonical form.
>
> Display the canonicalized version of each PATHNAME argument, resolvin
On 2021/09/05 20:54, Lawrence Velázquez wrote:
On Sun, Sep 5, 2021, at 11:11 PM, Dale R. Worley wrote:
L A Walsh writes:
I know how -h can detect a symlink, but I was wondering, is
there a way for bash to know where the symlink points (without
using an external program)?
My
On Mon, Sep 6, 2021, at 6:46 PM, L A Walsh wrote:
> On 2021/09/05 20:54, Lawrence Velázquez wrote:
> > The distribution ships with a "realpath" loadable builtin, FWIW.
> >
>
> I didn't know that... um, my bash isn't quite there yet:
>
> Ishtar:/> enable -f /opt/local/lib/bash/realpath real
11 matches
Mail list logo