Examples of Awk Command

In this blog, I will explain various situations where you can use AWK command.Scenario 1: Identify the occurrence of a particular delimiter present in a variable.For example , consider a variable v_dem=”v1|100|v2|200|v3|300″Use Awk command , you can easily find the occurrence of Pipe delimiter in v_dem variable. Here, NF stands for Number of fields . LINUX COMMAND : echo $v_dem |awk -F ‘|’ ‘{print NF} ‘ Scenario 2: Print the values separated by Delimiter(Pipe in this case) using AWK command.LINUX COMMAND : echo $v_dem | awk -F “|” ‘ {for…