Counting Chrome Tabs on MacOS (Or, I have an open tabs problem!)

Another aide-mémoire; open Chrome tabs can, on MacOS, be counted via the following incantation. This particular incantation will pull the tab count from all open windows – minimised or otherwise – without the need to activate Chrome in any way.

osascript -e{'set text item delimiters to linefeed','tell app"google chrome"to url of tabs of windows as text'} | wc -l

Which, when run on my currently open set of tabs, comes back with a number slightly higher than 4,000.

Continue reading