Created
March 15, 2019 09:23
-
-
Save Drezil/d1223c7748e323371e8643abd3768c14 to your computer and use it in GitHub Desktop.
safe "head" for files which could potentially have no line-breaks (gives first line & at max 25*4096 bytes)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function first | |
for file in $argv | |
echo "$file" | |
dd if="$file" count=25 status=none | head -n1 | |
echo "" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment