here is one script for reference: #!/bin/bash for file in $(find . -type f) do #echo "$file" ./nomossa "$file" done
hope it is helpful. -Larry 发件人: [email protected] [[email protected]] 代表 Juan José González [[email protected]] 发送时间: 2014年3月27日 5:13 收件人: [email protected] 主题: [FOSSology] Getting license of multiple files at one with nomos Hi eveyrone, I have been writing an script that detects licenses of files inside a folder (using python) using pseudo code is something like: for file in folder: license = open_subprocess("nomossa " + file) # creates and destroy a process for every file Now I am dealing with folder with thousands of files and I am trying to reduce runtime, not creating a new process for each file, something like: nomos = create_subprocess("nomossa") for file in folder: license = nomos.input(file) nomos.close() See that a process is opened once and then use it in an interactive way. This approach works with programs like cat, if you type cat on your terminal it waits for input, but not nomos. It is possible in this moment to do something similar, if not, is it feasible? I know I can use another approach: license = create_subprocess("nomossa" + a list of file) # nomos file1 file2 file3 But because how my script is evolving I like to consider the option explained above. Thank you very much. _______________________________________________ fossology mailing list [email protected] http://lists.fossology.org/mailman/listinfo/fossology
