[stdlib] Remove usage of grep -F, and add tests