@
gastlygem 还是不行,
>echo []. | sed -r 's!(\[|\]|\.)!\\\1!g'
sed: Not a recognized flag: r
Usage: sed [-n] Script [File ...]
sed [-n] [-e Script] ... [-f Script_file] ... [File ...]
[root@bruce3]/wideopen/stone
>echo []. | sed 's!(\[|\]|\.)!\\\1!g'
sed: 0602-404 Function s!(\[|\]|\.)!\\\1!g cannot be parsed.
[root@bruce3]/wideopen/stone
>echo []. | sed 's/(\[|\]|\.)/\\&/g'
[].
[root@bruce3]/wideopen/stone
>echo []. | sed 's/(\[|\]|\.)/zzz/g'
[].