Re: [SCRIPT] chomp: trim trailing whitespace
- From
- Jan Engelhardt <jengelh@linux01.gwdg.de>
- Date
- May 27, 2006, 10:15 UTC
- Message-ID
- <Pine.LNX.4.61.0605271212210.6670@yvahk01.tjqt.qr>
- In-Reply-To
- <4477B905.9090806@garzik.org>
Show 7 quoted lines
> 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. >
Pretty long script. How about this two-liner? It does not show 'bytes chomped' but it also trims trailing whitespace.
#!/usr/bin/perl -i -p s/[ \t\r\n]+$//
Jan Engelhardt