On 2024-09-07 11:50, Richard Owlett wrote:
This started with be exploring "regular expressions".
I discovered some tutorials that were using Bash in their samples.
One {lost the reference at the moment} was almost a match for a real
world problem I have.
But I've not used Bash in eons and have forgotten how to read a file
into a single variable or a array variable.
I've downloaded "Bash Reference Manual"
[https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html]
for when I need fine grained details.
I've bookmarked the various links on
[https://mywiki.wooledge.org/BashFAQ]
for quick reference.
I find neither to be search friendly.
Suggestions?
TIA
When I've been in the same position, I don't know that I have a single
go-to resource. Instead I tend to search for what I'm wanting to do at
the moment and then check out results that seem relevant from
https://stackoverflow.com/. I usually have pretty good luck there.
https://devhints.io/bash may be helpful, and a couple of the other pages
linked at the top looked pretty good, too (e.g. the wiki you referenced).
Unsolicited thoughts: When it comes to regexes (regular expressions),
the syntax can depend on where/in what (programming) language or
application you're using it. When I was trying to sort it all out I
stumbled upon https://www.regular-expressions.info/, which was a big
help to me. If you click on "Tools & Languages" at the top of the page,
you can also get explanations for how regexes are implemented in your
particular context. I used this site as a reference while trying to pull
data out of log files at work in a text editor (Sublime Text, which I
highly recommend for immediate feedback on your regex attempts). If you
don't have a big file to practice with, try saving one of the links on
https://openbible.com/texts.htm for a copy of the Christian Bible in a
single text file. I'm sure there's other text files like that out there
if that's not your cup of tea. Good luck with regex; each time I need it
is a fun and useful puzzle to solve.