Or since you have a highly predictable sequence of integers, use a loop
over them! Bash built in printf can also be useful here. Stackoverflow.com
is a good friend for recipes.
Mark
On Tue, 26 Apr 2016 17:52 Fabricio Cannini wrote:
> On 26-04-2016 10:33, James Starlight
On 26-04-2016 10:33, James Starlight wrote:
No, in my case it recognize ? like a ?
in script I have
for sim in ${HOME}/${tit}* ; do
if [[ -d $sim ]]; then
simulation=$(basename "$sim")
cd ${sim}
rm dd_dump_err*.pdb
trjconv -s md_${tit}?.tpr -f md_${tit}?.trr -o
> On 26 Apr 2016, at 15:33, James Starlight wrote:
>
> No, in my case it recognize ? like a ?
>
> in script I have
>
> for sim in ${HOME}/${tit}* ; do
> if [[ -d $sim ]]; then
> simulation=$(basename "$sim")
> cd ${sim}
> rm dd_dump_err*.pdb
> trjconv -s
No, in my case it recognize ? like a ?
in script I have
for sim in ${HOME}/${tit}* ; do
if [[ -d $sim ]]; then
simulation=$(basename "$sim")
cd ${sim}
rm dd_dump_err*.pdb
trjconv -s md_${tit}?.tpr -f md_${tit}?.trr -o
${HOME}/output/${simulation}.xtc -n -pbc mol -ur compact -fit trans
> On 26 Apr 2016, at 11:22, James Starlight wrote:
>
> Exactly the problem was there!
>
> BTW how to define selection more carefully (avoiding using *) tpr and
> trr to be sure that always only 1 file is selected assuming that all
> relevant trajectories and topologies
Exactly the problem was there!
BTW how to define selection more carefully (avoiding using *) tpr and
trr to be sure that always only 1 file is selected assuming that all
relevant trajectories and topologies are differs only on the digit e.g
resp_complex_conf7/md_resp_complex_conf7.tpr
> On 26 Apr 2016, at 11:00, James Starlight wrote:
>
> Hello,
>
> I faced with the folliwing problem:
>
> I try to make small script which will loop several folders
> corresponded to the invididual simulations and procecc each trajectory
> searching them by the keyword
Hello,
I faced with the folliwing problem:
I try to make small script which will loop several folders
corresponded to the invididual simulations and procecc each trajectory
searching them by the keyword
trr_file="md_resp_complex_conf"
#!/bin/bash