From 13dd5f564d218f2c80a0773985951fd068fc6b1e Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Fri, 20 Feb 2009 22:30:46 +0000 Subject: [PATCH] Keep the newline character at the end of the lines whose trailing whitespace we are deleting; otherwise, everything ends up on a single line. llvm-svn: 65185 --- utils/lint/remove_trailing_whitespace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/lint/remove_trailing_whitespace.sh b/utils/lint/remove_trailing_whitespace.sh index de58dbab7fc..6e0c9be0932 100755 --- a/utils/lint/remove_trailing_whitespace.sh +++ b/utils/lint/remove_trailing_whitespace.sh @@ -3,4 +3,4 @@ # Sample syntax: # $0 *.cpp -perl -pi -e "s/\s+\$//" $* +perl -pi -e 's/\s+$/\n/' $*