Re: [Open Babel] Multiple files conversion

2015-06-28 Thread Dmitri Maziuk
On 6/27/2015 1:16 PM, Matthew Baumgartner wrote: > Actually it does work, I tested it (on ubuntu 14.04). > > #make a ton of empty files > for i in {1..100} ; do touch tmpfilename_${i}.txt ; done > > ls *.txt > >Argument list too long. > > #this works > for f in *.txt ; do echo $f ; done Inte

Re: [Open Babel] Multiple files conversion

2015-06-27 Thread Craig James
You can also break it down like this (assuming the files have numeric names): for d in 0 1 2 3 4 5 6 7 8 9; do for f in $d*; do ... done done Craig On Sat, Jun 27, 2015 at 11:16 AM, Matthew Baumgartner wrote: > Actually it does work, I tested it (on ubuntu 14.04). > > #make a ton of e

Re: [Open Babel] Multiple files conversion

2015-06-27 Thread Matthew Baumgartner
Actually it does work, I tested it (on ubuntu 14.04). #make a ton of empty files for i in {1..100} ; do touch tmpfilename_${i}.txt ; done ls *.txt >Argument list too long. #this works for f in *.txt ; do echo $f ; done On 6/27/2015 6:01 AM, Dmitri Maziuk wrote: > On 6/26/2015 11:26 AM, Ma

Re: [Open Babel] Multiple files conversion

2015-06-27 Thread Dmitri Maziuk
On 6/26/2015 11:26 AM, Matthew Baumgartner wrote: > That is a limitation of linux there is a maximum length of the command > line. You should be able to use a for loop in bash like: > > for f in *.pdb ; do babel ${f} -omol2 ${f%.*}.mol2 ; done > > The ${s%.*} bit is some bash string manipulation fo

Re: [Open Babel] Multiple files conversion

2015-06-26 Thread Matthew Baumgartner
That is a limitation of linux there is a maximum length of the command line. You should be able to use a for loop in bash like: for f in *.pdb ; do babel ${f} -omol2 ${f%.*}.mol2 ; done The ${s%.*} bit is some bash string manipulation for stripping the file extension. On 06/26/2015 11:50 AM

[Open Babel] Multiple files conversion

2015-06-26 Thread AE
Hello, I am trying to convert multiple (10) files using open babel. Here is what I do: babel *.pdb -omol2 -m But it seems there are too many files, I get: -bash: /usr/local/bin/babel: Argument list too long How can I solve this? Thank you, Alsa---