[kwlug-disc] Question about `ps` and `grep`
Chris Craig
kwlug.org at ciotog.net
Fri Sep 27 19:49:54 EDT 2024
On Fri, Sep 27, 2024 at 7:30 PM Ronald Barnes via kwlug-disc <
kwlug-disc at kwlug.org> wrote:
> I'd even asked ChatGPT (4o mini) this question and its answer was quite
> good, but it still didn't trigger understanding:
>
> > The grep [t]mux command searches for the term "tmux". The square
> > brackets around the "t" create a character class that matches the
> > letter "t". This means that it will match "tmux" but not the literal
> > string "grep tmux".
>
> I was really dumb this week.
>
Not at all!
In this case ChatGPT is wrong as it often is. The command "grep [t]mux"
does match the literal string "grep tmux". What it doesn't match is the
literal string "grep [t]mux".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20240927/c71b815e/attachment.htm>
More information about the kwlug-disc
mailing list