[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [1/2OT]how to optimize below one



On 12 Feb, 2012, at 0:02, "Christofer C. Bell" <christofer.c.bell@gmail.com> wrote:

> On Sat, Feb 11, 2012 at 6:27 AM, lina <lina.lastname@gmail.com> wrote:
>> 
>> #!/bin/bash
>> 
>> for i in {0..110}
>> do
>> 
>> cat_g_f -f m001\_$i\_sot.xtc  m002\_$i\_sot.xtc  m003\_$i\_sot.xtc
>> m004\_$i\_sot.xtc   m005\_$i\_sot.xtc m006\_$i\_sot.xtc
>> m007\_$i\_sot.xtc  m008\_$i\_sot.xtc  m009\_$i\_sot.xtc
>> m010\_$i\_sot.xtc   m011\_$i\_sot.xtc  m012\_$i\_sot.xtc
>> m013\_$i\_sot.xtc    -cat -o m\_$i.xtc -nice 0
>> 
>> (anyone has some suggestions about how to optimize above one, it may
>> reach to m100, here I only type to 13, )
> 
> #!/bin/bash
> cat_g_f -f $(for x in $(seq -w 1 100) ; do echo -n
> "m${x}\_\$i\\_sot.xtc " ; done) -cat -o m\$i.xtc -nice 0
> 
> This piece here:
> 
> $(for x in $(seq -w 1 100) ; do echo -n "m${x}\_\$i\\_sot.xtc " ; done)

Look far more better than I could come up.
> 
> will be replaced with your sequence of filenames prior to the
> execution of the cat_g_f command.  Alternatively, you can copy and
> paste it out from here:

Thanks. 
> 
> m001\_$i\_sot.xtc m002\_$i\_sot.xtc m003\_$i\_sot.xtc
> m004\_$i\_sot.xtc m005\_$i\_sot.xtc m006\_$i\_sot.xtc
> m007\_$i\_sot.xtc m008\_$i\_sot.xtc m009\_$i\_sot.xtc
> m010\_$i\_sot.xtc m011\_$i\_sot.xtc m012\_$i\_sot.xtc
> m013\_$i\_sot.xtc m014\_$i\_sot.xtc m015\_$i\_sot.xtc
> m016\_$i\_sot.xtc m017\_$i\_sot.xtc m018\_$i\_sot.xtc
> m019\_$i\_sot.xtc m020\_$i\_sot.xtc m021\_$i\_sot.xtc
> m022\_$i\_sot.xtc m023\_$i\_sot.xtc m024\_$i\_sot.xtc
> m025\_$i\_sot.xtc m026\_$i\_sot.xtc m027\_$i\_sot.xtc
> m028\_$i\_sot.xtc m029\_$i\_sot.xtc m030\_$i\_sot.xtc
> m031\_$i\_sot.xtc m032\_$i\_sot.xtc m033\_$i\_sot.xtc
> m034\_$i\_sot.xtc m035\_$i\_sot.xtc m036\_$i\_sot.xtc
> m037\_$i\_sot.xtc m038\_$i\_sot.xtc m039\_$i\_sot.xtc
> m040\_$i\_sot.xtc m041\_$i\_sot.xtc m042\_$i\_sot.xtc
> m043\_$i\_sot.xtc m044\_$i\_sot.xtc m045\_$i\_sot.xtc
> m046\_$i\_sot.xtc m047\_$i\_sot.xtc m048\_$i\_sot.xtc
> m049\_$i\_sot.xtc m050\_$i\_sot.xtc m051\_$i\_sot.xtc
> m052\_$i\_sot.xtc m053\_$i\_sot.xtc m054\_$i\_sot.xtc
> m055\_$i\_sot.xtc m056\_$i\_sot.xtc m057\_$i\_sot.xtc
> m058\_$i\_sot.xtc m059\_$i\_sot.xtc m060\_$i\_sot.xtc
> m061\_$i\_sot.xtc m062\_$i\_sot.xtc m063\_$i\_sot.xtc
> m064\_$i\_sot.xtc m065\_$i\_sot.xtc m066\_$i\_sot.xtc
> m067\_$i\_sot.xtc m068\_$i\_sot.xtc m069\_$i\_sot.xtc
> m070\_$i\_sot.xtc m071\_$i\_sot.xtc m072\_$i\_sot.xtc
> m073\_$i\_sot.xtc m074\_$i\_sot.xtc m075\_$i\_sot.xtc
> m076\_$i\_sot.xtc m077\_$i\_sot.xtc m078\_$i\_sot.xtc
> m079\_$i\_sot.xtc m080\_$i\_sot.xtc m081\_$i\_sot.xtc
> m082\_$i\_sot.xtc m083\_$i\_sot.xtc m084\_$i\_sot.xtc
> m085\_$i\_sot.xtc m086\_$i\_sot.xtc m087\_$i\_sot.xtc
> m088\_$i\_sot.xtc m089\_$i\_sot.xtc m090\_$i\_sot.xtc
> m091\_$i\_sot.xtc m092\_$i\_sot.xtc m093\_$i\_sot.xtc
> m094\_$i\_sot.xtc m095\_$i\_sot.xtc m096\_$i\_sot.xtc
> m097\_$i\_sot.xtc m098\_$i\_sot.xtc m099\_$i\_sot.xtc
> m100\_$i\_sot.xtc
> 
> ;-)
> 
> Good luck!

Have a nice weekend, 
> 
> --
> Chris
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: CAOEVnYukT5uKt6i5PJ9uGizryg+U33PJc4anJvTEx7-0RGRt=Q@mail.gmail.com">http://lists.debian.org/CAOEVnYukT5uKt6i5PJ9uGizryg+U33PJc4anJvTEx7-0RGRt=Q@mail.gmail.com
> 


Reply to: