lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.1.10.0804060636140.30794@fbirervta.pbzchgretzou.qr>
Date:	Sun, 6 Apr 2008 06:37:51 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Marc Perkel <mperkel@...oo.com>
cc:	linux-kernel@...r.kernel.org
Subject: Re: tee question [OT]


On Sunday 2008-04-06 06:30, Jan Engelhardt wrote:
> On Sunday 2008-04-06 06:10, Marc Perkel wrote:
>>
>>  echo "1 2 3 4 5" | tee ...
>> |  cut -d \  -f -4 >> file1.txt
>> |  cut -d \  -f 1,2,5- >> file2.txt
>>
>>  The idea being that file1.txt would get "1 2 3 4" and
>>  file2.txt would get "1 2 5"
>>
>>  How do I do it? Tee wants a file as an argument and I
>>  want that file to be a process.
>>  Anyhow - I'm not very smart.
>
> echo "1 2 3 4 5" | \
> tee > (cut -d" " -f -4 >>file1.txt) |
> tee > (cut something else >>topieces) |
>       cut -d" " -f 1,2,5- >>file2.txt;
>

Everything can be a process, and in almost arbitrary order ... :-)

tee >(cut >file2.txt -d" " -f 1,2,5-) < <(tee >(cut >file1.txt -d" " -f -4) < <(echo "1 2 3 4 5")) >/dev/null
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ