shell编程——保留元字符

在shell中有以下几种字符含有特殊含义,属于保留元字符:

& * + ^ $ ` " | ?

当脚本在执行过程中遇到上述字符时,会执行其具有的特殊含义,除非在前面加“”屏蔽其特殊含义

[root@localhost ~]# sed -n '/$/p' test.sh 
#!/bin/bash
/root/collect/
65432
第三行 34567&x
第四行 45678$a
第五行 56789%c
[root@localhost ~]# sed -n '/$/p' test.sh 
第四行 45678$a
原文地址:https://www.cnblogs.com/dengtr/p/5027370.html