Skip to content

Instantly share code, notes, and snippets.

@anielsen001
Created June 20, 2020 18:44
Show Gist options
  • Save anielsen001/16850a974c7a87bbda3dc9dd3d3e9d9f to your computer and use it in GitHub Desktop.
Save anielsen001/16850a974c7a87bbda3dc9dd3d3e9d9f to your computer and use it in GitHub Desktop.
# example of using xargs to find files and sending files to a shell command with complicated file parsing
ls *mp4 | xargs -I{} sh -c 'base=$(basename $1 .mp4) ; ffmpeg -i "$1" -vcodec copy -an "${base}"_noaudio.mp4' -- {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment