This striking verse is found in the Magandiya Suta in the Sutta Nipata, which is generally held to be one of the oldest texts in the Pali canon.
Bhikkhu Thanissaro translates this as:
“Those who grasp at perceptions and views
go about butting their heads in the world.”
Fausböll, a 19th century pioneer translator, has:
“But those who grasped after marks and philosophical views, they wander about in the world annoying people.”
“Those attached to the notion ‘I am’ and to views
Roam the world offending people.”
The translator notes that “I am” is not in the quotation, but that its inclusion is warranted by material nearby.
The original Pali is:
Saññaca diṭṭhiñca ye aggahesuṃ
Te ghaṭṭayantā vicaranti loketi.
My rendition would be:
Those who cling to perceptions (saññā) and views (diṭṭhi)
Wander (vicarati) the world offending (ghaṭṭeti) people.
[Added later: Bhikkhu Varado’s translation, which I just discovered, is almost identical to mine: “Those attached to perception and views / roam the world offending people.”]