Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Requirement 1 : The character dismantling (place special characters), and line feed
# 单个字符-->sed后向引用(.)-->去掉特殊字符
echo "I like playing basketball,ball and volleyball"|sed 's#[, ]##g' | sed -r 's#(.)#\1\n#g'
## 等价(多项编辑,要用-e 连接)
echo "I like playing basketball,ball and volleyball"|sed -re 's#[, ]##g' -e 's#(.)#\1\n#g'
# -r(正则扩展-->regexp-extended)
sed : one a process, too slow!
vim : once loaded into memory, files can not be too big !
awk: copy the entire row to $ 0 , is also a time to load into memory!
Follow-up supplement