与搜索模式匹配的 Glob 文件并作为 python 程序的顺序输入

与搜索模式匹配的 Glob 文件并作为 python 程序的顺序输入

我在“ls”之后有这些目录:

08-21-resume-numrelblocks3-nqh2-numblocks2-stackonlyFalse-dockimgnegativereward-gpfg-uniformxy
08-22-32-nqh2-alpha-stack1-stack2-numrelblocks3-nqh2-dockimgnegativereward-gpfg-uniformxy-epsgreedyprobaction0.1-stackonlyFalse-SNA-Truemultihead-nonlinearitybeforeattn
08-22-6-12-alpha-stack11-stack12-numrelblocks3-nqh1-dockimgnegativereward-gpfg-multitower4-epsgreedyprobaction0.1-stackonlyTrue-GAT-Truemultihead-nonlinearitybeforeattn
08-22-alpha-stack5-stack6-numrelblocks3-nqh1-dockimgnegativereward-gpfg-multitower3-epsgreedyprobaction0.1-stackonlyTrue-GAT-Truemultihead-nonlinearitybeforeattn
08-23-alpha-stack6-stack9-numrelblocks3-nqh1-dockimgnegativereward-gpfg-multitower3-epsgreedyprobaction0.1-stackonlyTrue-SNA-Truemultihead
08-23-lstmcell-alpha-stack1-numrelblocks1-nqh1-dockimgnegativereward-gpfg-uniformxy-SpatialNeighborhoodAttention-Truemultihead-Falsestackonly-praFalse-qcmFalse

我需要将日期为 08-22 的目录输入到我的程序execute.py 中。例如

python execute.py 08-22-32-nqh2-alpha-stack1-stack2-numrelblocks3-nqh2-dockimgnegativereward-gpfg-uniformxy-epsgreedyprobaction0.1-stackonlyFalse-SNA-Truemultihead-nonlinearitybeforeattn 08-22-6-12-alpha-stack11-stack12-numrelblocks3-nqh1-dockimgnegativereward-gpfg-multitower4-epsgreedyprobaction0.1-stackonlyTrue-GAT-Truemultihead-nonlinearitybeforeattn 08-22-alpha-stack5-stack6-numrelblocks3-nqh1-dockimgnegativereward-gpfg-multitower3-epsgreedyprobaction0.1-stackonlyTrue-GAT-Truemultihead-nonlinearitybeforeattn

如何在不费力地单独复制和粘贴每一行的情况下做到这一点......

相关内容