用变量的形式,把hello替换为worlda=worldecho hello|sed "s/^.*/$a/g"若变量a中有”/”,则可以这样a=/root/world.txtecho hello|sed "s#^.*#$a#g" #Rightecho hello|sed "s/^.*/$a/g" #Error
(以上内容不代表本站观点。) --------------------------------- |
用变量的形式,把hello替换为worlda=worldecho hello|sed "s/^.*/$a/g"若变量a中有”/”,则可以这样a=/root/world.txtecho hello|sed "s#^.*#$a#g" #Rightecho hello|sed "s/^.*/$a/g" #Error
(以上内容不代表本站观点。) --------------------------------- |