Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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.

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.