In the above syntax, either search pattern or action are optional, But not both. If the search pattern is not given, then Awk performs the given actions for each line of the input. If the action is not given, print all that lines that matches with the given patterns which is the defau...
If quantifier is applied on a pattern grouped inside () metacharacters, you'll need an outer () group to capture the matching portion. Some regular expression engines provide non-capturing group to handle such cases. In awk, you'll have to work around the extra capture group. $ # note th...