How to replace a path with another path in sed?

前端 未结 7 1595
广开言路
广开言路 2020-12-01 07:30

I have a csh script (although I can change languages if it has any relevance) where I have to:

sed s/AAA/BBB/ file

The problem is that AAA

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 07:45

    We just needed to get the /h/ network path references out of the path. if we pointed them back to the /c/ drive they would map to non-existant directories but resolve quickly. In my .bashrc I used

    PATH=`echo $PATH | sed -e "s+/h/+/c/+g"`
    

提交回复
热议问题