I am a biology person and running a program named autodock. I have some files from ZINC library in .mol2 format. As per requirement I need to split this files with the csplit
command and I received all the content in my directory. The parent file was split into very very many small files. Every file name is like this: ZINC14382748.mol2
. Now I have to change all these files to pdbqt format and I have to use the following script:
#!/bin/csh # # $Id: ex02.csh,v 1.5 2007/07/19 21:52:59 rhuey Exp $
#
# use the 'prepare_ligands.py' python script to create pdbq files
cd $VSTROOT/VirtualScreening/Ligands
foreach f (`ls *`) echo $f pythonsh ../../prepare_ligand4.py -l $f -d ../etc/ligand_dict.py end
When I use it, it says
/bin/ls: Argument list too long
In short upon successful completion it will duplicate the above number of files into another format. So is there any reasonable solution to tackle this problem?
ls *
which will expand to all the files in your directory. If you have a lot of those files, the resulting command line is too long to process.ls *
) echo $f pythonsh ../../prepare_ligand4.py -l $f -d ../etc/ligand_dict.py endforeach f (./*)
instead offoreach f (ls *)
.