News for hackers. Stuff that matters.
Re:The Awk Programming Language (1988) [pdf] by mauvehaus on Thursday May 24, 2018 @12:31PM (#17145661)
Ooof. I have to respectfully disagree that perl deprecates awk. If I'm writing awk, it's usually because what I want to do is precisely what awk does by default: read a line, match it against a condition, and perform some action.

I could do all that in perl, but it's more stuff I'd need to dig up every time I wanted to do something awk-like. People who code perl regularly already have it, for sure. It's a barrier for those of us who don't, and one that awk doesn't have.

Awk isn't perfect, for sure, but I've transitioned from writing simple text processing in perl to doing it in awk because awk provides the basic framework that I'd end up doing ad-hoc and non-idiomatically in perl every time.

Again, all this with that caveat that I'm not a perl programmer. I used it for a couple of semesters in college, which was enough to be dangerous, but not truly proficient.

Re:The Awk Programming Language (1988) [pdf] by freeone3000 on Thursday May 24, 2018 @02:20PM (#17146802)
`perl -n` wraps code in an awk-alike start and finish stanza.

`perl -p` wraps code in a sed-alike start and finish stanza.

Re:The Awk Programming Language (1988) [pdf] by Koshkin on Thursday May 24, 2018 @08:39PM (#17149742)
So, basically, if I understand, Perl has both awk and sed built in.
Re:The Awk Programming Language (1988) [pdf] by vram22 on Friday May 25, 2018 @07:40PM (#17159088)
Yes, as per what I read long ago, Larry Wall created Perl as a sort of superset of parts of awk, sed, shell and C (maybe not shell).
Re:The Awk Programming Language (1988) [pdf] by harry8 on Tuesday May 29, 2018 @01:55AM (#17176799)
absolutely shell. Perl acts as glue between multiple processes very nicely. $foo = `foo_command`; is great. Opening named pipes. Python is more awkward because it's less like shell.
Re:The Awk Programming Language (1988) [pdf] by vram22 on Tuesday May 29, 2018 @02:31PM (#17181802)
Thanks, didn't know that about Perl.