Unable to create an index file for carbonyl carbon of the the peptide bond in protein for rmsd

GROMACS version:2022
GROMACS modification: No
Here post your question

I am unable to create an index file for carbonyl carbon of the peptide bond in protein for rmsd calculation?

I tried using
echo -e “r CO\na C & same residue as (name CA)\nq” | gmx make_ndx -f em.tpr -o index_carbonyl.ndx

But it is giving errors like

Found 0 atoms with residue name CO
Group is empty

Found 40 atoms with name C

Syntax error: “same residue as (name CA)”

I have also tried various other ways but it seems the syntax cannnot recognize & | and same residue.

Could someone help