Web lists-archives.com

Re: Does bash have a tool ?

On 03/04/2018 11:40 PM, Erik Christiansen wrote:
On 04.03.18 10:28, Richard Owlett wrote:

I don't have any background in Perl and the last formal course in
programming was in the 60's.

However awk and/or sed may be what I'm looking for and are well documented.
Your description of nedit is interesting. I'll investigate. I'm on my way
out at the moment.

Awk and Sed were created in the unix big bang, and might indeed be just
be your speed. (Some enhancements have been added to Awk since, such as
co-processes, but the current use case won't need that.)

It seems you're onto some doco, but this is hard to beat:
The Addison Wesley "The AWK programming Language" is a slender concise
exposition of the tool's use and capabilities, written by Awk's authors,
Aho, Weinberger, and Kernighan. The permuted index greatly eases finding
stuff in it.

This is a quick start: www.gnu.org/software/gawk/manual/gawk.html
Like the Addison Wesley dead-tree book, its "Sample Programs" shows that
Awk has a C-like syntax, supercharged with posix regexes, associative
arrays, etc.

A quick intro to regular expressions can be found in:
$ man regex
(Awk defaults to the more compact and easily read EREs, rather than
obsolete BREs.)

The awk manpage is a good reference, but as with all manpages, not a

Over the last three decades or more, I've found that Awk and shell have
more than adequately handled all my text munging requirements, right up
to a C-code generator taking structured English input to create
heterogenous communities of interacting state machines.


As to "manpages not a tutorial" <snicker> <snicker> *ROFL*
I'll admit content is there, but ...  ....
I've been referred to vim. Although awk and cousins are probably under the surface, vim.org is fascinating and accessible to end users such as myself.