cat /dev/random | hexdump -C | grep 'ca fe'
Note that it runs a lot faster now than it used to in the 90s. cat /dev/random | hexdump -C | grep 'ca fe'
Note that it runs a lot faster now than it used to in the 90s.I wondered how its speed could be adjusted and found `pv` can be used for throttling pipe throughput, so thanks for that too!
Limited to reading 50kB per second:
cat /dev/urandom | pv -q -L 50k | hexdump -C | grep 'ca fe' cat /dev/urandom | hexdump -C | grep '9 ca fe' cat /dev/random
causes my terminal to hang and my speakers start emitting a loud buzzing sound until the terminal is force-quit or system is restarted.I can understand the terminal not being able to handle the amount of data from /dev/random but for the speakers to start emitting sounds as a result of this is certainly very strange. Almost like /dev/random was being piped into /dev/audio or something. Anyone have an explanation?
An easy test would be to have something dump that bell character to the terminal as fast as possible and see if that does it, and also try /dev/zero to check that doesn't.
PC Speaker - https://en.wikipedia.org/wiki/PC_speaker
ANSI Escape Sequences - https://en.wikipedia.org/wiki/ANSI_escape_code
See parent's comment, how he piped output from /dev/random into the next command and not to stdout.
I just saw this and thought this was pretty cool! Running your command in nushell, and eventually aborting it gives the following output
^CError: nu::shell::terminated_by_signal
× External command was terminated by a signal
╭─[entry #28:1:32]
1 │ cat /dev/random | hexdump -C | grep 'ca fe'
· ──┬─
· ╰── terminated by SIGINT (2)
╰────
Just wanted to random praise the nushell team for this amazing level of detail!- error handling is neglected in the basic design: <https://github.com/nushell/nushell/issues/10633>, <https://github.com/nushell/nushell/issues/10856>, <https://github.com/nushell/nushell/issues/8615>, <https://github.com/nushell/nushell/issues/6617>
- control-C interrupts its internals with obviously-wrong error: <https://github.com/nushell/nushell/issues/8828>, is midhandled in other ways <https://github.com/nushell/nushell/issues/8206>
- something is horribly wrong with the basic design of command-line arguments: <https://github.com/nushell/nushell/issues/9939>, <https://github.com/nushell/nushell/issues/9766>
- they're getting the fundamentals of globs on command lines wrong: if you pass string literals to an external command, they're still processed for globs. this means `ls ""` (internal) and `^ls ""` (external) behave differently: <https://github.com/nushell/nushell/issues/9558>