echo -n HASH >> hashes
The -n flag removes the trailing newline
-n
Remove One:
truncate -s $(($(stat -c '%s' hashes)-1)) hashes
Remove All:
sed -i 's/$//' hashes
#cheat-sheet #cryptography