linux awk for loop: awk -F”#” ‘{for(i=1;i<=NF;i++) { }’ t.txt; awk for loop array: awk ‘BEGIN{a[“km”] = “m”;a[“kn”] = “n”;for(i in a) {}}’;awk while loop

Source: linux awk command – awk loop example: awk for and while