I need to run the following command line (in Linux Ubuntu) from a Python script and store the results into a variable
I am using the following code
dir = 'labels.txt'
for dir in subdirs:
args = "tail -1 %s"%(dir)
output = subprocess.check_output(args, shell = True)
I have the following error message: No such file or directory. I can't figure out what I'm doing wrong. Thank you for your help
Fred