March 2018
Beginner to intermediate
416 pages
9h 24m
English
So far, we have been using print statements mainly to produce simple yet standardized output. With a print statement, we specify the expressions to print as a list separated by commas. The output is separated by single spaces, followed by a newline. The print statement has two forms:
print expr1, expr2, ……, exprnprint (expr1, expr2, ………, exprn)
Both print the string value of each expression separated by the Output Field Separator (OFS); the default is a single space followed by the Output Record Separator (ORS); the default is newline. Using parentheses is necessary if an expression uses the > relational operator to mark its differentiation from redirection operator. Here expression could be any AWK expression or any constant ...
Read now
Unlock full access