grep 如何解决匹配前后的字符
echo "45645645645aaa45645646" | grep -o -P '.{0,3}aaa.{0,4}'
645aaa4564
前 3 个字符,后 4 个字符
哪些目录安装了anaconda3
locate anaconda3 | grep -o -P '.{0,100}anaconda3.{0,1}' | sort | uniq
REF
https://www.jb51.cc/faq/2946726.html
标签:字符,grep,anaconda3,前后,匹配,个字符 From: https://www.cnblogs.com/emanlee/p/17069832.html