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:
On Mon, 2005-12-05 at 02:09, Mike McCarty wrote:


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.


I agree that the holding space notion is weird.  However

[snip]

My point (which perhaps got buried in the noise) is that
there are different strokes for different folks.

[snip]

The free Cygwin tools bring all the useful parts to
windows.  OSX sensibly already has them.  What else do
you care about?  And why use a unix-like system if
you don't want to take advantage of it's toolset?

I've used Cygwin for about one day, and took it back
off my machine. When I'm not using Linux, I normally
use DOS, not Windows. I found a couple of undesirable
interactions between Cygwin and Windows XP, and anyway,
as I said, I normally use DOS, not any version of Windows
when I'm not using Linux.

I don't use Linux because it has a "powerful toolset".
If I wanted that, I'd prefer DEC VMS, where the commands
at least make sense and have the same syntax everywhere.

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.


Many OS's don't come with a C compiler, and even on the
ones that do, the easiest way to do a lot of text transformations
is to use the regular expression library routines.

Many machines don't come with an OS, but I can port my compiler
anywhere.

I don't do a lot of text transformations. In fact,
I hardly ever do text transformations. I can't recall the
last one I did (other than the little one-off I did for
the OP). Mostly, I read e-mail, and browse the web, and
edit source code for programs. I installed Linux on my
machine because I got a contract in October of 2004, and
was requested to use it by the guy who hired me.

OTOH, I've been using *NIX like systems since 1985 or so,
and am comfortable with the development environment.

But, as I said, different strokes for different folks.
I know quite a few people who have as their first reaction
to anything a script, others think awk always fits, and
others like perl.

Some prefer C, since it goes anywhere, even where *NIX systems
do not. Like very small embedded systems.

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