Awk separate string is the most commonly used function, awk supports single delimiter separation and multiple delimiter separation.
Awk can use the awk -F option and awk FS variable to achieve string separation.
Let’s see how to use awk -F option and awk FS variable to separate strings in linux / unix.
awk uses delimiters to separate strings
Use awk FS variables to separate strings
We use awk FS variables to separate strings based on specific characters (also called delimiters). In the following example, we divide the string into multiple fields based on the “:” symbol, with field numbers from 1 to N.