Skip to content

Instantly share code, notes, and snippets.

@ryancheley
Created February 17, 2018 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryancheley/52df339396d568020b31f6da865e2911 to your computer and use it in GitHub Desktop.
Save ryancheley/52df339396d568020b31f6da865e2911 to your computer and use it in GitHub Desktop.
My first really complicated Bash Script
(echo '#!/bin/sh'; echo -n "MP4Box"; array=($(ls *.h264)); for index in ${!array[@]}; do if [ "$index" -eq 1 ]; then echo -n " -add ${array[index]}"; else echo -n " -cat ${array[index]}"; fi; done; echo -n " hummingbird.mp4") > com.txt | chmod +x com.txt | ./com.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment