Skip to main content

All Questions

2 votes
1 answer
605 views

How to pipe output of command to two separate commands and store outputs

I have a really long command that runs over a huge file and I am forced to run it twice which doubles the time it takes to run. This is what I am doing at the moment: x=$(command | sort -u) y=$(...
markovv.sim's user avatar
7 votes
3 answers
1k views

Do file descriptors optimise writing to files?

Is it equivalent to have commands print to a file directly, as opposed to writing to a file descriptor? Illustration Writing to file directly: for i in {1..1000}; do >>x echo "$i"; done ...
user avatar