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

lucioric lucioric at ibt.unam.mx
Mon Feb 11 19:53:01 CET 2019


 Hello. try:
 echo -e "r 1-442\nq\n" | gmx make_ndx -f equilibration.gro
 If this does not work, try:
 gmx make_ndx -f equilibration.gro<<<echo -e "r 1-442\nq\n"
 Best regards
 On Sun, 10 Feb 2019 22:49:29 +0000, Pedro Deira <pedro.deira at gmail.com> 
 wrote:
> You need to include the newlines in your echo to get the result you 
> want.
>
> Cheers
>
>
> On Sun, 10 Feb 2019, 22:38 ZHANG Cheng <272699575 at qq.com wrote:
>
>> 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!
>> --
>> Gromacs Users mailing list
>>
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
>> posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users 
>> or
>> send a mail to gmx-users-request at gromacs.org.
>>

-- 
 M.C. Lucio Ricardo Montero Valenzuela
 Estudiante de doctorado en Ciencias Bioquímicas
 Lab. del Dr. Federico Sánchez (ext. 27666)
 Instituto de Biotecnología, UNAM.


More information about the gromacs.org_gmx-users mailing list