Re:Dimsum is like head or tail, but pulls randomly from the ...
by avibryant on Monday November 26, 2012 @02:54PM
(#4833653)
Yep, though a feature request I've put in is to respond to a ctl-c by producing the results from the stream so far... that way if it's taking a while on a large file you can interrupt and still get something useful.
[ Parent
| on HN ]
Re:Dimsum is like head or tail, but pulls randomly from the ...
by cgs1019 on Monday November 26, 2012 @03:34PM
(#4833866)
This breaks ctl-c in my opinion. When I ctl-c I want shit to stop, not dump (potentially large quantities of) output into my terminal.
Re:Dimsum is like head or tail, but pulls randomly from the ...
by wodow on Monday November 26, 2012 @03:51PM
(#4833965)
It could accept another signal (e.g. SIGUSR1) and have this clearly documented.
Re:Dimsum is like head or tail, but pulls randomly from the ...
by neilk on Monday November 26, 2012 @04:41PM
(#4834182)
I just added the SIGUSR1 feature to my hacky perl script (see my other comment).
e.g.
$ (while true; do cat /usr/share/dict/words; done;) | ./randline 3 &
[2] 93937
$ kill -s SIGUSR1 93937
declinograph
brotheler
woolpack
$ kill -s SIGUSR1 93937
lustrify
brotheler
bromophenol