Created
January 19, 2018 18:57
-
-
Save newz2000/48fa41f9da681567064bf50177966819 to your computer and use it in GitHub Desktop.
Create a script from vtt files
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
#!/bin/bash | |
for i in *.vtt | |
do | |
cat "${i}" | grep -v ' -->' | grep -v -e '^$' > "${i}.txt" | |
done | |
for i in *.txt | |
do | |
echo "${i}" >> Script.txt | |
echo >> Script.txt | |
cat "${i}" >> Script.txt | |
echo >> Script.txt | |
done | |
## Problems: | |
# • If your script was edited and has line numbers, this doesn't remove them | |
# • This probably requires your shell to be bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment