Mailinglist Archive: opensuse (770 mails)

< Previous Next >
Re: [opensuse] Separate /usr?
Hello,

On Tue, 14 Aug 2012, j debert wrote:
I would have said more like Windows and it's monolithic
do-everything-under-the-sun style of coding and constant reinventing
of the wheel rather than using what is already there and piping
between tools. Like, why reinvent sed in python? Just build a script
and call sed. Simple, right? There are many existing tools that are
not being used because... Why??? Baffling. And what's starting to
happen: The tools are disappearing, deprecated because people prefer
to reinvent the wheel, do things the hard way, so no one uses them and
when you need them, *they're not there anymore!*

Such as? Anyway: I like the *nix style. I use ed if applicable, sed,
awk, perl, grep, agrep, sgrep, pcregrep, cut, sort, cat, tac, head,
tail, find, xargs, ...

Oh, I think afio is gone from the distro.

-dnh

PS: yeah, I often write about how you can replace external commands
with bashisms or one perl-script, but it's always the matter of
what to use for what purpose. You should see some of my
"one-liners" in bash ... But in scripts, esp. in loops therin, I
try to avoid external programs from the "unix toolbox" and switch
to using perl rather soonish, mostly depending on how often I
think I'll be using the script and for what. ;) I e.g. have a
short indexing script (using several finds, that has 11 pipes in
it, a bunch of subshells, awk, sed, grep, sort, ...) and as that
script indexes a couple of TB currently producing 17MB in ~200k
lines, disk-io from find dominates runtime by several orders and
thus I don't care about inefficiencies in that script ;) Another
case is the texmf scripts (mktex* etc.). Well, they are portable.
$ file /usr/share/texmf/bin/noarch/* | \
sed '/link/d; s/.*: *//' | sort | uniq -c
3 C shell script, ASCII text
31 POSIX shell script, ASCII text
1 POSIX shell script, ASCII text, with CR, LF line terminators
2 POSIX shell script, ISO-8859 text
1 a texlua script, ASCII text
But some stuff I'd like to replace by a perl-script, esp. when
some script calls others repeatedly in a loop (those as functions
in the perl-script - whoopdie doo ;)

--
GETOPT(3)
BUGS
This manpage is confusing.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups