Skip to content

Instantly share code, notes, and snippets.

@cpswan
Last active October 17, 2015 11:28
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 cpswan/1251b6f2e45110e31933 to your computer and use it in GitHub Desktop.
Save cpswan/1251b6f2e45110e31933 to your computer and use it in GitHub Desktop.
Attempt to create symlinks for best quality music from mix of wav and mp3
while read -u 3 outerdir
do
cd "${outerdir}"
ls -1 ../../wav/"${outerdir}" > list
while read -u 4 innerdir
do
ln -s ../../wav/"${outerdir}"/"${innerdir}" "${innerdir}"
done 4< list
done 3< test
ls -1 ../wav > tree
while read line; do mkdir -p "${line%/*}"; done < tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment