Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › General › Korn Shell Scripting › Reply To: Korn Shell Scripting
Do you need to use a script to retrieve fileX and associated charge files? If not, you may be able to use Cloverleaf functionality and a tcl proc to get the job done.
Are you able to use the directory parse TPS option in the fileset-FTP protocol within Cloverleaf? Since fileX contains a list of desired charge files, you should be able to write a dir parse tcl proc to pass Cloverleaf this list for processing.
You didn’t say where the dir file listing or the actual charge files are located. If they are all stored in the same directory, the dir parse tcl proc would be passed a directory of file names (which would include your fileX) and then interrogate fileX. Based on the data in fileX, the tcl proc would create a list of valid charge file names to pass back to cloverleaf for processing.
There are a number of different ways to code the tcl proc to meet just about any need. All Cloverleaf wants returned from the dir parse tcl proc is a list of files you want to process.
I usually try to use any built in Cloverleaf functionality before turning to external solutions.