A fundamental feature of a programming language is that you can write scripts or programs. That's what we will explore here.
As with other languages, we need a text editor - not a word processor. I use BBEdit but you can choose whichever one suits you.
Create a directory on your computer where you can save your scripts, and the files you want to work on. The scripts do not have to be executable, so don't worry about that. Instead, awk uses the script as a collection of commands, instead of having to enter them in the command shell.
Now in your text editor create a file 'command.awk' that contains the following line:
{print}
That is your first awk script!
Recall the text file we used earlier 'names.txt'. It should be in your current directory you made previously.
In your shell, enter the following command:
awk -f command.awk names.txt
This tells awk to execute the script 'command.awk' ( -f ) on the file 'names.txt'.What you should see is a simple output of the whole file:

Congratulations! That was your first awk script executed successfully!