Skip to content

Instantly share code, notes, and snippets.

@xbin999
Last active August 29, 2015 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xbin999/5d6ae721d04d51f99c39 to your computer and use it in GitHub Desktop.
Save xbin999/5d6ae721d04d51f99c39 to your computer and use it in GitHub Desktop.
为七牛云存储上传的文件日志显示图像的markdown格式
# only display markdown result
/Users/yangbin/bin/qrsync /Users/yangbin/bin/qiniu-conf.json 2>&1 | grep "Put" | awk -F"[:]" '{printf "![](http://xbin999.qiniudn.com/%s )\n", $6 }'
# replace the original log with markdown format
/Users/yangbin/bin/qrsync /Users/yangbin/bin/qiniu-conf.json 2>&1 |sed -e 's/\(=> xbin999:\)\(.*\)/=> ![](http:\/\/xbin999.qiniudb.com\/\2\)/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment