Glob files matching a search pattern and feed as sequential input to python programNo module Found error in...

Circular Reasoning for Epsilon-Delta Proof?

Is there any way to keep a player from killing an NPC?

Transposing from C to Cm?

Are there any elected officials in the U.S. who are not legislators, judges, or constitutional officers?

Uri tokenizer as a simple state machine

How can I unambiguously ask for a new user's "Display Name"?

Why in most German places is the church the tallest building?

How do I prevent other wifi networks from showing up on my computer?

Are modern clipless shoes and pedals that much better than toe clips and straps?

Could George I (of Great Britain) speak English?

Was it ever possible to target a zone?

How would a Creature that needs to be seen by Humans evolve?

Handling Disruptive Student on the Autistic Spectrum

What are some interesting features that are common cross-linguistically but don't exist in English?

What is the best type of paint to paint a shipping container?

Can I get temporary health insurance while moving to the US?

How do I get toddlers to stop asking for food every hour?

Prevent use of CNAME Record for Untrusted Domain

Can you answer this logic non-math puzzle question correctly?

Why does Windows store Wi-Fi passwords in a reversable format?

Are the players on the same team as the DM?

Compelling story with the world as a villain

How long do you think advanced cybernetic implants would plausibly last?

How do proponents of Sola Scriptura address the ministry of those Apostles who authored no parts of Scripture?



Glob files matching a search pattern and feed as sequential input to python program


No module Found error in Linux but Works fine in WindowsHow can I load a module at runtime?Running Python script over multiple directories and multiple filesPiping output from python to program results in infinite loopsearch the pattern and replace the value in a filePattern recognition and summing columns between two csv/excel filesCommand to find and combine files matching a complex name patternextracting string from files and merge (python)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have these directories after "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


I need to feed directories that are on date 08-22 into my program execute.py. E.g.



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


How do I do so without laboriously copy and pasting each line individually...










share|improve this question






















  • 1





    Have you tried "execute.py $(ls 8-22-)" and using sys.argv ? Or "echo 8-22- | execute.py" and reading the filenames? How about using the glob package?

    – stolenmoment
    yesterday











  • Do you need anything more complicated than for f in 08-22-*; do python execute.py "$f"; done ? (Since you tagged your question Ubuntu I'm assuming you are using the default bash shell - or a compatible Bourne-like shell)

    – steeldriver
    yesterday




















0















I have these directories after "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


I need to feed directories that are on date 08-22 into my program execute.py. E.g.



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


How do I do so without laboriously copy and pasting each line individually...










share|improve this question






















  • 1





    Have you tried "execute.py $(ls 8-22-)" and using sys.argv ? Or "echo 8-22- | execute.py" and reading the filenames? How about using the glob package?

    – stolenmoment
    yesterday











  • Do you need anything more complicated than for f in 08-22-*; do python execute.py "$f"; done ? (Since you tagged your question Ubuntu I'm assuming you are using the default bash shell - or a compatible Bourne-like shell)

    – steeldriver
    yesterday
















0












0








0








I have these directories after "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


I need to feed directories that are on date 08-22 into my program execute.py. E.g.



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


How do I do so without laboriously copy and pasting each line individually...










share|improve this question
















I have these directories after "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


I need to feed directories that are on date 08-22 into my program execute.py. E.g.



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


How do I do so without laboriously copy and pasting each line individually...







linux ubuntu find python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









fpmurphy

2,57612 silver badges16 bronze badges




2,57612 silver badges16 bronze badges










asked yesterday









user3180user3180

1213 bronze badges




1213 bronze badges











  • 1





    Have you tried "execute.py $(ls 8-22-)" and using sys.argv ? Or "echo 8-22- | execute.py" and reading the filenames? How about using the glob package?

    – stolenmoment
    yesterday











  • Do you need anything more complicated than for f in 08-22-*; do python execute.py "$f"; done ? (Since you tagged your question Ubuntu I'm assuming you are using the default bash shell - or a compatible Bourne-like shell)

    – steeldriver
    yesterday
















  • 1





    Have you tried "execute.py $(ls 8-22-)" and using sys.argv ? Or "echo 8-22- | execute.py" and reading the filenames? How about using the glob package?

    – stolenmoment
    yesterday











  • Do you need anything more complicated than for f in 08-22-*; do python execute.py "$f"; done ? (Since you tagged your question Ubuntu I'm assuming you are using the default bash shell - or a compatible Bourne-like shell)

    – steeldriver
    yesterday










1




1





Have you tried "execute.py $(ls 8-22-)" and using sys.argv ? Or "echo 8-22- | execute.py" and reading the filenames? How about using the glob package?

– stolenmoment
yesterday





Have you tried "execute.py $(ls 8-22-)" and using sys.argv ? Or "echo 8-22- | execute.py" and reading the filenames? How about using the glob package?

– stolenmoment
yesterday













Do you need anything more complicated than for f in 08-22-*; do python execute.py "$f"; done ? (Since you tagged your question Ubuntu I'm assuming you are using the default bash shell - or a compatible Bourne-like shell)

– steeldriver
yesterday







Do you need anything more complicated than for f in 08-22-*; do python execute.py "$f"; done ? (Since you tagged your question Ubuntu I'm assuming you are using the default bash shell - or a compatible Bourne-like shell)

– steeldriver
yesterday












0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f537158%2fglob-files-matching-a-search-pattern-and-feed-as-sequential-input-to-python-prog%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f537158%2fglob-files-matching-a-search-pattern-and-feed-as-sequential-input-to-python-prog%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...