Once you have an output file, open it up in your favorite editor or display it using your favorite editor take a look at your output. You will quickly get an idea of what you may want to search.
grep "show interface status" outputfile.txt | grep connected | awk '{print $1}' | uniq -c | sort -rn
Explanation: search for the text "show interface status" in the output file, then pipe to a search for the word connected to extract only the connected interfaces; then use awk to print only the first column (tagged device name); print only each unique device name BUT count the number of times it appeared ; then sort that resulting list to present the numbers in decending order.....
Sounds like a mouth full! But it's very easy. If that seemed too difficult, you can just start with the first part of the query and it will still be useful.
grep "show interface status" outputfile.txt
grep "show inventory" outputfile.txt | grep PID | awk '{print $NF}'
Explanation: Search the text "show inventory" in the output file, then focus your search on the PID key word, then print only the last field, which is the serial number. You can then simply upload this output into your vendors support tool (Cisco has one) to list the support status of your entire network.
grep "show running" outputfile.txt | grep -i password
In one query you can audit every running config on your network no matter how enormous your company is and quickly find all the little surprises in your local usernames.
grep "show version" outputfile.txt | grep -i "Configuration register"
grep "show cdp" outputfile.txt | grep SEP | grep -v detail | wc -l
I removed any line from containing detail because I wanted to remove the output of the the show cdp neighbor detail command.
grep "show cdp neighbor detail" outputfile.txt | grep -i platform | grep -i air
grep -i public outputfile.txt