# requirez(commandLine.awk) BEGIN { Who = "Tim Menzies"; What = "bars"; When = "2006"; How = "b:cd:hk:m:nt:v:w:B"; Why = "show column data as histograms"; } function usage() { about(Who,What,When,Why); prints("Usage: "What" [FLAGS] FILE"," ", "FILE is columns of data."," ", " -b NUM width of bars; default=["Col3"]", " -c show copyright", " -d CHAR field seperator", " -h show help", " -k NUM width of 'key' column;default=["Col1"]", " -m CHAR character to draw one histogram dot; default=["Mark"]", " -n no sorting of keys", " -t NUM target column; default=["Collect"]", " -v NUM width of 'value' column; default=["Col2"]", " -w NUM width of each data bin; default=["Round"]", " -B displays all bins including empty bins"); } function defaults() { NoSort=0; inits(How,"-b 20 -d , -k 4 -m * -t 2 -v 3 -w 10"); } function set(x,y) { if (x == "b") {return Col3=y }; if (x == "c") {copyleft(); exit}; #if (x == "d") {return FS="," }; if (x == "d") {return FS=y }; if (x == "h") {usage(); exit}; if (x == "k") {return Col1=y }; if (x == "m") {return Mark=y }; if (x == "n") {return NoSort=1 }; if (x == "t") {return Collect=y }; if (x == "v") {return Col2=y }; if (x == "w") {return Round=y }; if (x == "B") {return DispEmpty=1 }; bad(x "? usage: " What " " How); exit; }