shell正則提取字符串中的數字並保存到變量中

2019獨角獸企業重金招聘Python工程師標準>>> html 1.提取數字到變量python temp = `echo "helloworld20181212 | tr -cd "[0-9]""` echo ${temp} 2.釋義tr -cd "[0-9]"shell     tr是translate的縮寫,主要用於刪除文件中的控制字符,或者進行字符轉換bash     -d表示刪除,[0-
相關文章
相關標籤/搜索