[gmx-users] How to use "echo" to output index file with only one command line?

ZHANG Cheng 272699575 at qq.com
Mon Feb 11 18:21:32 CET 2019


Dear Pedro Deira,


Sorry, could you please show me how to include the newline using "echo" with only one command line?


Yours sincerely
Cheng




------------------ Original ------------------
From:  "ZHANG Cheng"<272699575 at qq.com>;
Date:  Mon, Feb 11, 2019 06:36 AM
To:  "gromacs.org_gmx-users"<gromacs.org_gmx-users at maillist.sys.kth.se>;

Subject:  How to use "echo" to output index file with only one command line?



I can successfully output the index file by doing it step by step:


$ gmx make_ndx -f equilibration.gro
$ r 1-442
$ q


But I am not sure how to do it in just one line.


I tried these but all could not work


$ echo r 1-442 q | gmx make_ndx -f equilibration.gro
$ echo "r 1-442" q | gmx make_ndx -f equilibration.gro
$ echo "r 1-442" "q" | gmx make_ndx -f equilibration.gro


Thank you!


More information about the gromacs.org_gmx-users mailing list