3 ms·
Given that barf is already using the filename to indicate the compression, why not just move the final byte of the file into the filename instead? Something lik
by messe 5y ago
Given that barf is already using the filename to indicate the compression, why not just move the final byte of the file into the filename instead? Something like,
head -c -1 "$file" > "$file$(tail -c1 "$file")"
EDIT: Obviously this has the corner case of null bytes