New answers tagged

1

I've had an occasion where none of the usual tricks, reset or stty sane, worked (after accidentally calling print on a python bytearray). I had success with method 2 listed on this helpful blog. I've since created a most helpful alias: alias fix='echo -e "\033c"'


1

The recode program can do this quickly even for large files, either frequency statistics either for bytes or for the characters of various character sets. E.g. to count byte frequencies: $ echo hello there > /tmp/q $ recode latin1/..count-characters < /tmp/q 1 000A LF 1 0020 SP 3 0065 e 2 0068 h 2 006C l 1 006F o 1 0072 r 1 ...


1

if multiline (9 lines) solution is ok, check below hextail.sh script: #!/usr/bin/env bash #par1==buffsize, par2=xxd-columns-width, par3=sleepVal; defaults: 256 16 0 size=${1:-256}; cols=${2:-16}; cnt=0; hbuff=$(eval printf '00%.0s' {1..$size}) while true; do hbuff=${hbuff:2}$(dd bs=1 count=1 2>/dev/null | xxd -p) #shiftLeft, add 1b printf ...


0

In the 1970s, UNIX had all official executables in /bin and /usr/bin was a location beneath the users home directories (e.g. /usr/dmr) that was available for any user to store own binaries that might have been of interest for others as well. The result of this open /usr/bin was a junk yard of undocumented software and so Stephen Bourne wrote a cron script ...


0

Just want to add little more to @chaos solution hexdump -ve '1/1 "%.2X "' input | sed 's/.*\(FF D8.*FF D9\).*/\1/' | xxd -r -p > image.jpeg I have just added space after %.2X and, between FFD8 and FFD9. This is to avoid matching the shifted pattern such as: 0f fd 80 ... 0f fd 90



Top 50 recent answers are included