Assorted helpful snippets for use in your shell.
Last active
June 10, 2021 16:45
-
-
Save sbolel/b22c6ee1a6b033c71939b22ba4505786 to your computer and use it in GitHub Desktop.
Shell Snippets: assorted helpful snippets (sh/zsh/bash)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# @description convert .m3u8 file to .mp4 | |
ffmpeg -i "https://website.com/path/to/file.m3u8" \ | |
-bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# @desc replaces all occurances of " " in a filename with "_" | |
# @author enzotib (https://unix.stackexchange.com/users/6539/enzotib) | |
# @see https://unix.stackexchange.com/a/19059/215916 | |
find /search/path -depth -name '* *' \ | |
-execdir bash -c 'mv -- "$1" "${1// /_}"' bash {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment