Re: Getting a text file rid of all superfluous blank lines

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

 



Les Mikesell wrote:

[snip]

It's rarely worth the trouble to compile a specialized
program for anything that can be done with regular
expression since the native unix tools are so good
at text manipulation.  If you can describe the problem

For me, it's rarely worth the trouble to read the man
pages and try to figure out how the weird syntax of
sed works all over again, when in 5 minutes or so I can
have a specialized program working. In fact, for *really*
simple stuff, I just use a keyboard macro for my favorite
text editor (not vi, and not emacs) and tell it to repeat
the edit.

in words, you can usually come up with a sequence of
steps to transform what you have into what you want
with regular expression substitions.

IOW, regular expressions are (1) complicated (2) work
differently with every tool even with the same OS,
(3) usually take three or four iterations to get right,
and (4) not portable to other OS, whereas a little C
program (1) is simple to write, (2) has the same
syntax on all systems, and (3) is portable even to
my non-hosted environment on my little MC68HC11 machine
running no OS at all.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux