Skip to content

Instantly share code, notes, and snippets.

@EddiG
Last active September 6, 2019 15:42
Show Gist options
  • Save EddiG/15d1ed726fe737669e1b9918f59eaa8f to your computer and use it in GitHub Desktop.
Save EddiG/15d1ed726fe737669e1b9918f59eaa8f to your computer and use it in GitHub Desktop.
All useful info regarding bash

Cheatsheets

Convert all flac files to the m4a

for m in *.flac; do ffmpeg -i "$m" -acodec alac "${m%.flac}.m4a"; done

In case when the .flac contains the picture additionally to the audio stream

for m in *.flac; do ffmpeg -i "$m" -c:a alac -c:v copy "${m%.flac}.m4a"; done
  • ${m%.flac} - the filename without extension

Clone all branches to the new repository

NEW_REPO=git@bitbucket.org:yourworkspace/yourrepository.git
for branch in `git branch -r`; do git push $NEW_REPO ${branch#*/}:${branch#*/}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment