#!/usr/bin/env awk
#
# Print the string 's' in blue with an added newline.
# If 'n' is set, the trailing newline is omitted.
#
# Parameters:
#   - s: the string to print
#   - n: omit the trailing newline if 'n > 0'
#
# Dependencies:
#   - None
#
# See also:
#   - printbold
#   - printerr
#   - printok
#   - printwrn
#
# Examples:
#   - tawk '$pktsSnt == 42 { printinf("42 packets sent") }' file.txt
#   - tawk '{ printinf("Hello ", 1); printinf("World") }' file.txt

function printinf(s, n,        _n) {
    _n = (n ? "" : "\n")
    printf "\033[0;34m%s\033[0m%s", s, _n
}
