Giorgos Keramidas wrote:
On 2006-05-12 11:27, Chuck Swiger <[EMAIL PROTECTED]> wrote:
It is, and I wish to acknowledge the above are entirely valid solutions
to the problem, but...
python -c 'import sys; print sys.stdin.read().strip()' < file...
...has the advantage of being human readable. My old 300-baud accoustic
modem used to generate output which in hindsight looks astonishingly
close to regex character classes. :-)
HEH! I see the joke about Perl being similar to "line noise" is not
something local to our Greek IRC channels :)
Indeed. :) I must confess that it doesn't do in-place replacement of
the files, though. I'd have to do a two-liner, I guess:
python -c 'import sys,fileinput
for line in fileinput.input(inplace=1): print line.strip()' file1
file2 ...
--
-Chuck
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"