---
title: "Toolkit - How can I add line numbers and row count in my Toolkit script output?"
description: "Adding line numbers and row counts in Toolkit script output applies to Linux/UNIX shell script toolkits. Use the GNU awk command to post-process output and append a pipe command to your sampler script execution."
url: "https://docs.itrsgroup.com/docs/faq/geneos/360003612997-geneos-toolkit-how-can-i-add-line-numbers-and-row-count-in-my-toolkit-script-output/index.html"
---

**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}'
```

![awk command in Toolkit sampler](https://docscdn.itrsgroup.com/faq/images/geneos/toolkit-sampler-awk-command.png)

Result:

![Dataview of Toolkit sampler](https://docscdn.itrsgroup.com/faq/images/geneos/toolkit-sampler-results.png)


