[gmx-users] Bash scripting and Gromacs
Fabricio Cannini
fcannini at gmail.com
Tue Apr 26 17:52:13 CEST 2016
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
> ${HOME}/output/${simulation}.xtc -n -pbc mol -ur compact -fit trans <
> ${HOME}/enter.txt
>
> and gromacs sent
>
> trjconv -s md_resp_complex?.tpr -f md_resp_complex?.trr -o
> /nfs_homes/clouddyn/MD_bench/Resp_cyt_cluster/output/resp_complex_conf7.xtc
> -n -pbc mol -ur compact -fit trans
>
>
> Is it possible specify more flexible e.g 1 of any character or 2 of
> any characters within the file name etc like REGEX syntax
>
> Thanks!
Brace expansion can be useful in such cases too:
http://www.thegeekstuff.com/2010/06/bash-shell-brace-expansion/
More information about the gromacs.org_gmx-users
mailing list