Re: [SCRIPT] chomp: trim trailing whitespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



H. Peter Anvin wrote:
Jeff Garzik wrote:

Attached to this email is chomp.pl, a Perl script which removes trailing whitespace from several files. I've had this for years, as trailing whitespace is one of my pet peeves.

Now that git-applymbox complains loudly whenever a patch adds trailing whitespace, I figured this script may be useful to others.


This is the script I use for the same purpose. It's a bit more sophisticated, in that it detects and avoids binary files, and doesn't throw an error if it encounters a directory (which can happen if you give it a wildcard.)

Chewing the EOF blanks is nice. The only nit I have is that your script rewrites the file even if nothing was changed.

	Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux