New answers tagged pipe
You can try this approach: cat bigfile.txt| while IFS= read -r line; do echo '%s\n' "$line" |shuf |sort -n| grep "sample"; done IFS is used to split the output into lines here.
I ran across something similar recently and needed to time how long it took to load a particular page. I just used /dev/null as my output file and which let me get all the nice stats without printing any of the HTML. curl www.google.com -o /dev/null For my self, I also wrapped it in the time command for extra data time (curl www.google.com -o /dev/null) ...
find . -type f | while read IN; do if [ "x$(file -b --mime-type $IN)" = "ximage/png" ]; then convert png:$IN jpg:$IN.jpg; fi; done; Meaning of arguments: . Find in the current directory -type f Just find files, not directories/sockets/etc. while read IN; do Put each filename into the variable IN and run the loop on it. if [ "x$(file -b ...
It seems that pv is waiting for data from rsync, and rsync is waiting for data too (stuck in select()) and not closing the input to pv. So it's a deadlock. Same happens when you substitute pv with something else (like dd). It seems that those commands just don't behave like rsync expects them to. Haven't found a workaround short of killing everything: ...
Top 50 recent answers are included