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 for stripping the file > extension.
Not gonna work because the error is from the shell expanding '*.pdb' to a "too long" list. Shell expansion is still there in the above. If you move all your pdb files in one directory, just "for f in `ls` ; do obabel ..." will do. Otherwise there's a million ways to check the extension, but they all require jumping through extra hoops. Dima ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss