Live Chat!

Redirect output to multiple processes

          0 votos

November 8th, 2006 toydi

Since tee can read the standard input, and write to multiple files, we may leverage this feature so that it writes to multiple processes (instead of files).
tee >(process1) >(process2) >(process3) | process4
>( ) (see process substitution) pretends itself as a write-only file. Everything you write into it, will be passed to the command (as standard [...]

Posted in Common, grep, process substitution, tee | Hits: 23439 | 26 Comments »

Compare two directory listings

* * * * * 1 votos

November 8th, 2006 toydi

Given two directories: ~/dir-new/ and ~/dir/,
$ ls ~/dir-new/
file-01.txt
file-02.txt
file-new.txt
$ ls ~/dir/
file-01.txt
file-02.txt
file-old.txt
To compare them:
comm

Posted in Text Manipulation, comm, process substitution | Hits: 26722 | 2 Comments »