Fix command gsed testing

(cherry picked from commit 75fc4a2053c84d938219a81242491f10e071ad4f)