read -p "tag(muti tags with ';'): " tag_list if [[ $tag_list != "" ]]; then for tag in `echo$tag_list | sed 's/;$//' | sed 's\;\ \g'`; do sed -i "${tag_line}a- ${tag}"$posted_file let tag_line=$tag_line+1 done fi
www@v-ubuntu:~/git_repo/hexo_blog$ ./new_from_md.sh ~/markdown/systemd.md INFO Created: ~/git_repo/hexo_blog/source/_posts/systemd.md cat /home/www/markdown/systemd.md >> /home/www/git_repo/hexo_blog/source/_posts/systemd.md INFO Start processing Name Posts Path Linux 1 tags/Linux/ MySQL 1 tags/MySQL/ editer&ide 1 tags/editer-ide/ life 1 tags/life/ tag(muti tags with ';'): Linux Done! www@v-ubuntu:~/git_repo/hexo_blog$