Thread (9 messages) 9 messages, 7 authors, 2006-05-28

Re: [SCRIPT] chomp: trim trailing whitespace

From: Jan Engelhardt <hidden>
Date: 2006-05-27 12:42:13
Also in: lkml

quoted
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]+$//
Yes, it does, but a bit too aggressive for what we need :)
Whoops, should have been s/[ \t\r]+$//
And the CL form is
  perl -i -pe '...'

Somehow, you can't group it to -ipe, but who cares.


Jan Engelhardt
-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help