Create a gist now

Instantly share code, notes, and snippets.

Embed
commandline tools dealing with missing trailing newline
# diff -c 1.txt 3.txt - lack of newline is announced in output
*** 1.txt 2012-11-03 23:24:05.000000000 -0400
--- 3.txt 2012-11-03 23:28:44.000000000 -0400
***************
*** 1,2 ****
! foo
bar
\ No newline at end of file
--- 1,2 ----
! food
bar
\ No newline at end of file
# bash - prompt is tacked onto output
➔ cat 1.txt
foo
bar➔
# zsh - lack of newline is shown with "%"
➔ cat 1.txt
foo
bar%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment