Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 03:27 < e36freak> while read -r line; do ...; done < "$file"
- 03:27 < geckos> Zer000: i think that too
- 03:27 < e36freak> you also see it used without redirection, such as:
- 03:27 < e36freak> comm -13 <(sort file1) <(sort file2)
- 03:28 < e36freak> >(...) can be used with, say: cmd1 | tee >(cmd2 > file) | cmd3
- 03:28 < qman__> zcat image.gz | tee >(dd of=/dev/sda1) | tee >(dd of=/dev/sdb1)
- | dd of=/dev/sdc1
- 03:28 < geckos> e36freak: I see
- 03:28 < e36freak> qman__: nice example
- 03:28 < qman__> one gunzip, three simultaneous writes
- 03:29 < e36freak> though you could just use one tee; zcat foo.gz | tee >(dd
- of=/dev/sda1) >(dd of=/dev/sdb1) | dd of=/dev/sdc1
- 03:29 < geckos> qman__: wow thats pretty cool
- 03:29 < qman__> ah, didn't know tee accepted multiple args like that
- 03:29 < e36freak> aye
Advertisement
Add Comment
Please, Sign In to add comment