Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Question is quite simple

I want to make this kind of bash maddness in a simple way with some shell utillitie:

for a in `seq -w 01 25`; do b=`echo $a*.mkv`; c=${b%%.mkv}; ls mkvmerge -o "${c}_mux.mkv" "$c.mkv" "audio/$c.ac3" "audio/$c.ass"; done

Idea is just to pass MANY FILES (filenames) into params for some other application FOR multiple command execution. Same like in example just without bash language.

share|improve this question

closed as off topic by EEAA, Sven, womble, mailq, Shane Madden Aug 25 '11 at 17:42

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

echo some list of space separated files; xargs -n 1 /run/some/command
share|improve this answer

Pretty sure you want xargs. Let me know if you have any questions on how to use it.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.