News for hackers. Stuff that matters.
Re:Bash Pitfalls by jayd16 on Monday September 07, 2020 @09:25PM (#24404407)
What kind of parsing do you think can be done in "a real programming language" that can't be done in bash?

I like objects and performance and abstraction and other things about other languages but bash has a _lot_ of parsing tools.

Re:Bash Pitfalls by ryl00 on Monday September 07, 2020 @11:17PM (#24404919)
This is where perl really shines for me. Regular expressions are front and center, making it so frictionless to slice and dice text. My bash knowledge is so stunted because I bail to perl as soon as the going gets tough. :)
Re:Bash Pitfalls by dredmorbius on Tuesday September 08, 2020 @04:58AM (#24406524)
Bash's regex library is called "sed".
Re:Bash Pitfalls by hnlmorg on Tuesday September 08, 2020 @06:35AM (#24407061)
`sed` differs from different implementations (eg GNU vs BSD).

Bash does actually have a fair amount of regex support built in too though it's not as well talked about.

Re:Bash Pitfalls by dredmorbius on Tuesday September 08, 2020 @08:54AM (#24407889)
Both points taken.

Mine remains: that shell affords capabilities via utilities. Awk (again, with numerous implementations) also offers regex capabilities, some not offerred by sed, and missing a few.

When writing cross-platform scripting, adhering to common standards rises in importance. This is possible, if occasionally limiting.