Bash Snipets: Porovnání verzí

Z Waritkova wiki
Skočit na navigaci Skočit na vyhledávání
(Založena nová stránka s textem „Get all video files in dir recursive <source lang="bash">find . -regextype posix-extended -regex '.*\.(avi|mkv|flv|mov|mpg|wmv|mp4|m4v|rm)' -exec realpath…“)
 
Řádek 1: Řádek 1:
 
Get all video files in dir recursive
 
Get all video files in dir recursive
 
<source lang="bash">find . -regextype posix-extended -regex '.*\.(avi|mkv|flv|mov|mpg|wmv|mp4|m4v|rm)' -exec realpath {} + | sort</source>
 
<source lang="bash">find . -regextype posix-extended -regex '.*\.(avi|mkv|flv|mov|mpg|wmv|mp4|m4v|rm)' -exec realpath {} + | sort</source>
 +
 +
Convert subtitles from Win-1250 to UTF8
 +
<source lang="bash">ls *.srt | while read a; do iconv -f WINDOWS-1250 -t UTF-8 "$a" > temp; mv temp "$a"; done;</source>

Verze z 12. 12. 2015, 16:29

Get all video files in dir recursive

find . -regextype posix-extended -regex '.*\.(avi|mkv|flv|mov|mpg|wmv|mp4|m4v|rm)' -exec realpath {} + | sort

Convert subtitles from Win-1250 to UTF8

ls *.srt | while read a; do iconv -f WINDOWS-1250 -t UTF-8 "$a" > temp; mv temp "$a"; done;