add everything-factory.sh script

pull/20/head
hossein s. borhani 1 year ago committed by GitHub
parent 84d1d1adf5
commit 4a1cd755df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,18 @@
#!/bin/bash
# cd in to the folder, duh
# remove old cruddy everything files
rm ./---everything-full.m3u ./---everything-lite.m3u ./---randomized.m3u ./---sorted.m3u
# create everything-full file by copying everything except duplicates
cat $( ls -v ) | awk '!seen[$0]++' > ./---everything-full.m3u
# read the full file and remove all extra stuff, we just need the links
cat ./---everything-full.m3u | sed -n '/^#/!p' > ./---everything-lite.m3u
# shuffle the lite file
cat ./---everything-lite.m3u | shuf > ./---randomized.m3u
# sort the lite file
cat ./---everything-lite.m3u | sort > ./---sorted.m3u
Loading…
Cancel
Save