×
Back to Geneos FAQ
Toolkit - How can I add line numbers and row count in my Toolkit script output?
Note
This solution only works for Linux/UNIX based shell script toolkits.
You can use the GNU command awk for post processing your script output in order to print line numbers and count the number of rows. You can append the following pipe command to your existing toolkit sampler script execution:
| awk '{print NR-1 "," $0}; END {print "<!>rowCount," NR-1}'
Result:
["Geneos"]
["Geneos > Netprobe"]
["FAQ"]