fixed selection of sed vs gsed