A technician needs to know how many routes in the routing table match a particular community tag while triaging a peering issue overnight at a regional ISP's carrier hotel router, without needing to see each individual route. Which pipe modifier gives just that number?
Select an answer to reveal the explanation.
Short Explanation
Sometimes you don't want the list, you just want the total. Pipe the output into count and Junos throws away the actual lines and hands you back a single number instead.
Full Explanation
The count pipe modifier takes whatever lines a command would normally display and replaces them with a single summary line reporting the total line count, which is exactly the behavior needed when the goal is a quantity rather than the detail behind it, such as how many routes matched a given filter expression before that filter's output was piped further. Find is a positioning modifier: it scans output for the first line containing a given string and begins display from that point onward, which still shows all subsequent lines rather than collapsing them into a count. Except does the inverse of match, displaying every line that does not contain the given pattern, but it still returns full lines of output, not a numeric total. Last displays only a specified number of lines from the end of the output, which is useful for tailing a long list but does not compute how many lines existed overall. A practical combination worth remembering is chaining a match or a route-filter expression before count, since count operates on whatever output reaches it, so narrowing first and counting second is how a precise tally like this gets produced.