linux之簡單文本處理

1.tr命令 tr 命令可以用來刪除一段文本信息中的某些文字。或者將其進行轉換。 使用方式: 選項 說明 -d 刪除和set1匹配的字符,注意不是全詞匹配也不是按字符順序匹配 -s 去除set1指定的在輸入文本中連續並重復的字符 # 刪除 "hello shiyanlou" 中所有的'o','l','h' $ echo 'hello shiyanlou' | tr -d 'olh' # 將"hel
相關文章
相關標籤/搜索