echo "2014年7月21日" | tr -cd "[0-9]" 这样就可以提取出2014721 转载于:https://www.cnblogs.com/sea-stream/p/9665087.html