Exercise 3e: Using An External File
The queue command can read directly from an external file. If a file "argument.txt" is created and the commands will be passed to the executable from the contents of the txt file. The arguments.txt contains:
2 3 4 5 6 7
The script script.py reads and prints the arguments.
#!/usr/bin/env python import sys for arg in sys.argv[1:]: print arg
Create the following submit description file and submit the job.
executable = script.py output = output/$(ClusterId).$(ProcId).out error = error/$(ClusterId).$(ProcId).err log = log/$(ClusterID).log queue arguments from arguments.txt
HTCondor will put in the queue three jobs for the executable by giving different arguments each time. In the first job will pass 2 and 3 as arguments, in the second will pass 4 and 5 and in the third 6 and 7. The file arguments.txt is located in the current working directory. If it is somewhere else, the fully qualified name must be provided. A list of arguments can also be used, for example: ```Ini executable = script.py arguments = "$(argument)" output = output/$(ClusterId).$(ProcId).out error = error/$(ClusterId).$(ProcId).err log = log/$(ClusterID).log
queue argument in H2, H3, H4, H5 ```