I have a file:
AWK question about the example
This command that works well:
awk '{ gsub(/...../, "&\n" ) ; print}' file
AWK q
uesti
on ab
out t
he ex
ample
Why this command does not print the same result?
awk '{ gsub(/.{5}/, "&\n" ) ; print}' file
AWK question about the example
Why this command does not print the same result?
awk -v WIDTH=5 '{ gsub(".{"WIDTH"}", "&\n"); print }' file
AWK question about the example