Exercise 3d: Input Arguments
In this execise, the queue command is used to assign multiple values to many and different commands. To be more specific the "script.py" file opens the *.txt files, reads the lines and prints them. These files first need to be transferred and then used as arguments for the executable "script.py". The script script.py reads the names of the files that are given as arguments. It opens the files and prints the lines of the file.
#!/usr/bin/env python
import sys
input_filename = sys.argv[1]
print "The name of the file is ", input_filename
input_file = open(input_filename, 'r')
for line in input_file:
print line
input_file.close()
Welcome to Exercise 3!!!
It is time to investigate the functionalities of queue command!!
executable = script.py
output = output/$(ClusterId).$(ProcId).out
error = error/$(ClusterId).$(ProcId).err
log = log/$(ClusterId).log
queue transfer_input_files, arguments from (
script.txt,script.txt
)
queue ... from (
1. ...
)
queue ... from (
1. ...
)
Last update: November 26, 2019