[kwlug-disc] possible presentation ideas

Khalid Baheyeldin kb at 2bits.com
Sun Dec 16 18:06:43 EST 2018


On Sun, Dec 16, 2018 at 4:29 PM <tomg at sentex.ca> wrote:
> Quoting Khalid Baheyeldin <kb at 2bits.com>:
>
> > Awk is pretty useful, and I use it a lot.
> >
> > In its simplest form, I just use it as an alternative to the command: cut.
>
> Man!  This was a terrific introduction to awk, it was introductory
> and simple and easy to understand.  I think I know awk now just from
> your e-mail.  Thanks very much!  :-D

That was my point: it is easy, just practice a bit and you will find
it very useful.

> I'm going to keep it handy and re-read the last 2/3s though, but I
> think I basically understood all of it.

Ask away if you need to ...

Here is another useful snippet that I used today. Between 16.04 and 18.04
something changed and an existing script that I had did not work. I needed
to change something in it.

This gets the current IP address of the machine it is running on:

ip addr |
  grep 'state UP' -A2 |
  tail -n1 |
  awk '{print $2}' |
  awk -F/ '{print $1}'


-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- anonymous




More information about the kwlug-disc mailing list