Created
August 10, 2017 08:08
-
-
Save happypeter/82febe81714394cc0ba87370597a7046 to your computer and use it in GitHub Desktop.
当前文件夹下的所有 .mp4 文件,转换成一个 js 的 object
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
echo '[' > output.js | |
for item in `ls *.mp4` | |
do | |
if [ "$item" = "list.sh" ] | |
then | |
continue | |
fi | |
echo """ { | |
title: 'xxx', | |
link: '$item' | |
},""">>output.js | |
done | |
echo ']' >>output.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment