This article says you can use a % syntax to remove file extensions:$ s=a/b.mkv$ echo ${s%.*}a/bHow do you combine the % syntax with the % in xargs to achieve the desired result for a set of lines?$ cat | xargs -I % echo ffmpeg -i % (INSERT MAGIC HERE)a/b.mkvffmpeg -i a/b.mkv a/b.mp4c/d.mkvffmpeg -i c/d.mkv c/d.mp4
Combining bash % with xargs %
bash;xargs