I have a list of files to be used as input that is very long. I was looking at the file input module, which seems to have some attractive features, [https://docs.python.org/3/library/fileinput.html][1]
But I could not figure out how to use it without entering each file name by hand, which would be prohibitively long.
What I would love to do is submit something like
python myscript.py (ls -d -1 dir/* | grep summary.txt)
Or I could push this same bash command to filelist.txt and submit that way; either way the trick would be to submit without having to type each file.
ls -d -1 dir/* | xargs grep summary.txt | xargs python myscript.pysummary.txt? Under no circumstances should you be processing the output ofls. (Also,grepreads from standard input or a file argument, not both.)