You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix handling of small files and files with null in first 8 bytes (#116)
The `read -rn 8` command doesn't seem to cope with small files, and
does all kinds of strange things (on macOS at least) including:
- not reading anything at all from files with short first lines
- reading too much from files with long first lines (more than 8 chars)
Switch to us `head -c8` instead, which is safer, plus some fiddly
use of `tr` to ignore null bytes early in a way that works for older
and newer versions of bash.
0 commit comments