Gawk conditionals

From wikinotes
Revision as of 01:20, 19 July 2021 by Will (talk | contribs) (Created page with "= If Statments = <blockquote> <source lang="awk"> if ( var >= 10 ) { print "var is larger than or equal to 10"; } else if ( var <= 5 ) { print "var is smaller than or eq...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If Statments

if ( var >= 10 ) {
   print "var is larger than or equal to 10";
} else if ( var <= 5 ) {
   print "var is smaller than or equal to 5";
} else {
   print "all other cases"
}