News for hackers. Stuff that matters.
Re:The Awk Programming Language (1988) [pdf] by asicsp on Thursday May 24, 2018 @02:38AM (#17141571)
yeah.. I like the `s///` syntax in sed/perl than the `sub/gsub` syntax.. plus the regex is lacking in awk.. no backreference(gawk provides, but only in replacement section).. and perl has non-greedy, lookarounds, code in replacement section, etc

other nice features I'd like in awk is `tr` and `join`

Re:The Awk Programming Language (1988) [pdf] by ams6110 on Thursday May 24, 2018 @09:04AM (#17143541)
Why add 'tr' and 'join' to awk when they exist on their own?

That's part of why people avoid perl. It's very capable, but that wide scope is counter to the unix philosophy that prefers simple, focused utilities that can be combined in pipelines.

Re:The Awk Programming Language (1988) [pdf] by asicsp on Thursday May 24, 2018 @09:20AM (#17143686)
looks like I didn't word it properly...

you could ask why have sub/gsub when there is sed... that's because you need that for specific field or string in addition to other processing.. similarly, having tr for specific string/field is useful..

I meant join as in perl's join - to construct a string out of array values with specified separator

Some examples:

* https://stackoverflow.com/questions/48920626/sort-rows-in-cs...

* https://stackoverflow.com/questions/45571828/execute-bash-co...

* https://stackoverflow.com/questions/48925359/sorting-groups-...