שָׁמָ֔רוּ (they kept/obeyed) in numbers 9:23 is grammatical in pausal form and, this particular morphological form of the lexeme only appears six times in the Tanakh/Hebrew Bible. If you have access to software with a database of the Hebrew Bible you may be able to run vowel point and accent mark sensitive searches to find all six occurrences of שָׁמָ֔רוּ.
However, did you know that before software was available it was possible to local all six occurrences if you had access to the Masorah or an edition of the Hebrew Bible with the Masorah. What is the Masorah? The Masorah is a very broad ancient corpus of notes concerning various textual and scribal matters of the Hebrew Bible. Some of these notes were written in the margins of Hebrew manuscripts, as notes were written on the top of pages, and much longer notes were often written in the back of the codices of the Hebrew Bible. According to Page Kellly the purpose of the Masorah …
was to safeguard the sacred text from any additions or deletions. The Mp notes function within that larger purpose by providing the reader or copyist instant information in the margin about how a given text feature ought to appear. If the text was found to be contrary to its Mp notes, the circumstances needed investigation in order to ascertain whether an error had occurred. Without Mp notes, errors would not so readily be brought to the attention of the reader or copyist. Although the rubrics marked by Mp notes often appear trivial to the uninitiated, there is actually a fundamental principle at work behind the text features that are annotated. Mp notes mark features in the text where an error could easily be made. Many Mp notes, for example, pertain to vowel letters, which are sometimes present (plene) and sometimes absent (defective), yielding different spellings for the same word. In such cases, the Mp marks the traditional spelling so that a letter will not be accidentally inserted or deleted where it might not be noticed otherwise.Kelley, Page H., Daniel S. Mynatt, and Timothy G. Crawford. The Masorah of Biblia Hebraica Stuttgartensia: Introduction and Annotated Glossary. Grand Rapids, MI: William B. Eerdmans Publishing Company, 1998. Print.
Now, If you have a hard copy of the Biblia Hebraica Stuttgartensia you will notice on page 229 (Numbers 9:23) the Massorah Parva (on the left margin) and the BHS masorah magna register (underneath the main text) alert you to important information about verse 23 (the part in the red box).
The Masorah Parva tells us that the phrase על־פי יהוה ביד־משה only occurs 6 times in the Hebrew Bible and that special morphological form שָׁמָ֔רוּ also occurrences 6 times. The Masorah register below tells us where we can find the corresponding lists to the Massorah in the companion Masorah Gedolah volume. List 3053 for שָׁמָ֔רוּ and list 860 for על־פי יהוה ביד־משה .