Sujet : Re: lisp scripts
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 10. Feb 2025, 02:06:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vobjel$t621$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 09.02.2025 22:56, Dan Espen wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 09.02.2025 18:21, Dan Espen wrote:
gazelle@shell.xmission.com (Kenny McCormack) writes:
>
In article <voajsf$nd2k$1@dont-email.me>,
Dan Espen <dan1espen@gmail.com> wrote:
...
... to Perl.
... something any programmer could readily understand.
>
I'm sure opinions will vary on that.
>
They guy that wrote the sed/awk stuff agreed.
>
Curious; do you mean the authors of those languages or the
authors (pl.) of that unspecific mentioned "sed & awk" book?
>
Given clarity/cryptically of syntax (and their semantics)
these three languages (Awk, Perl, Sed) for sure vary a lot!
This was an app developed by one of my co-workers.
The app consisted of many shell scripts and many invocations of
awk and sed. There were dozens of files in the app. I was trying to
fix it and worked on it for quite some time before I decided it was too
many files and too many different languages being used.
Ah, now I see what you meant...
I ended up re-writing the whole thing as a single Perl script.
The whole thing was all in one file and much easier to understand.
As I said, the original author agreed.
...the author of that project, obviously.
Yes, we can often observe that projects grow that way and that there
are often far too many individual tools involved, and unnecessarily.
If you use Awk anyway there's absolutely no need for using Sed. And
with Perl you can also avoid the Shell/Awk glue and stay within one
language.
Reasons for Shell & Awk are that these are Unix standard and can be
expected to exist "everywhere" to create portable scripting software.
And Awk is also advantageous for its much clearer syntax (as opposed
to Perl), but Shell as well cat gen quite messy if you want to write
scripts functionally correct.
(Python, that I think you mentioned elsthread, has it's own inherent
quirks and has the same non-standard property as Perl.)
It's the projects' choice to select the appropriate tool in any given
context.
Perl can be cryptic if you use the cryptic parts of the language.
I don't.
Perl has some inherent cryptic syntax; something that other languages
(including Awk) don't have. And Sed is anyway "applied cryptography"
par excellence.
Janis