Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FILE=$HOME/wittyfilter.github.io/wordlists.md
INIT_STRING='---
layout: page
title: Word Lists
---
'
# 格式化单词释义(把单词,音标,解释分离开)
RESULT=$(echo -e $1 | sed -E 's/([a-zA-Z]+) (\|[^\|]+\|) (.*)/\
### \1\
>\3\
/g')
if [ ! -f $FILE ]; then
echo $INIT_STRING > $FILE
fi
echo $RESULT >> $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.