Autoselection for gmx trjcat

GROMACS version: 2021.3 ubuntu
GROMACS modification: Yes/No
Here post your question

I would like to auto select ‘c’ for continue for gmx trjcat. The following command was used

echo c c c c c | gmx trjcat -f trajectory1.xtc trajectory2.xtc trajectory3.xtc trajectory4.xtc trajectory5.xtc -n index.ndx -o output.xtc -settime

When running this command I get

Fatal error:
Error reading user input

How can I adjust the command to fix this?

You can try ‘c c c c c’ instead of c c c c c c

for example for hbond I use this command and it works.

echo ‘55 59’ | gmx hbond -f lutein_x6_md_2_complete_traj.xtc -s lutein_x6_md_2.tpr -n index_2020.ndx -num lut-O32-600-700.xvg -r 0.4 -b 600000 -e 700000 -contact yes

You can also ask on linux stackexchange forum