These two tools sit in the middle of a pipeline and change what passes through. sed edits the line as a whole, and awk takes it apart into fields. Knowing which of the two you want is most of the skill.
Each one is marked as you go, and the explanation arrives straight after, which is
the part worth reading.
4 questions, marked as you go.
Tasks
These need your own device. Run the command in Termux, then paste what it printed.
The marking looks at what the output means, so spacing, version numbers and
ordering do not matter. If you have not installed anything yet, the
lesson covers the setup.
Pull one field out of a colon-separated file
This writes a small inventory file, one machine per line, with a name, an address and a port separated by colons. It then prints a single field from every line.
Run this in Termux
On your own device. Nothing on this page executes it. The command runs in
your terminal, and this box only reads what you paste back.
Three lines should come back, and the names and ports should be gone.
the first server address is printed
the database server address is printed
one address per line, three in all
the command actually ran
What a good answer looks like
Three lines, each a bare address and nothing else: 10.0.0.11, 10.0.0.12 and 10.0.0.21. The colon told awk where the field boundaries are, so $2 is the middle piece of each line and the names and ports are dropped. Notice that the order of the lines is unchanged, because awk works through the file from top to bottom. Without the -F option awk would have split on whitespace, found one field per line, and printed the whole line instead.
Marking your own work
Both halves of this are checked in your browser, with no server involved, so nothing
stops you from pasting output you did not run. The tasks are written so that the
easiest way to pass one is to actually do it and read the result, which is the whole
intention.