Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>[...]</p> <pre><code>for i in `cat list.txt` </code></pre> </blockquote> <p>Never use this syntax :</p> <pre><code>for i in $(command); do ...; done # or for i in `command`; do ...; done </code></pre> <p>This syntax read the output of a command word by word and not row by row which often creates unexpected problems (like when row contain some spaces and when you want read a row like an item for example). </p> <p>There always is a smarter solution :</p> <pre><code>command|while read -r; do ...; done # better general case to read command output in a loop while read -r; do ...; done &lt;&lt;&lt; "$(command)" # alternative to the previous solution while read -r; do ...; done &lt; &lt;(command) # another alternative to the previous solution for i in $DIR/*; do ...; done # instead of "for i in $(ls $DIR); do ...; done for i in {1..10}; do ...; done # instead of "for i in $(seq 1 10); do ...; done for (( i=1 ; i&lt;=10 ; i++ )); do ...; done # such that the previous command while read -r; do ...; done &lt; file # instead of "cat file|while read -r; do ...; done" # dealing with xargs or find -exec sometimes... # ... </code></pre> <p>I wrote a course with more details about this subject and recurring errors, but in French, unfortunately :)</p> <p>To answer the original question, you could use something like :</p> <pre><code>Convert() { ffmpeg -i “$1” -vcodec mpe4 -sameq -acodec aac -strict experimental “$1.mp4” } Convert_loop(){ while read -r; do Convert $REPLY done &lt; $1 } Convert_loop list.txt </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload