We now turn to another Unix tool the awk programming language I have cho- example %-20s) makes the string left-justified instead.
Preceding the number by - (for example %-20s) makes the string left-justified instead. There are a large number of ways to format numbers.
all of the lines that do not match the search string rather than printing the lines that match it. In the following case
a string of characters to be printed. To identify the start of the string we put a double- ... Using printf numbers can be left-justified (printed.
Awk uses syntax based on grep and sed for printf. • Similar in concept to the “C” language command. ... indicates a string field left justified
Printf Formats . string ? a group of characters enclosed in double quotes. Strings ... left-justify the expression within its field.
and Join 1. Awk
30 sept. 2015 { printf "%10s %6d
" $1
awk '{ printf "%-10s %s
" $1
GAWK: Effective AWK Programming 6.1.4.1 How awk Converts Between Strings and Numbers . ... to left-justify the argument within its specified width.