shell - Using sed to find a folder directory in a file and replacing with another directory -



shell - Using sed to find a folder directory in a file and replacing with another directory -

so trying utilize simple sed command in shell find , replace string in bash file alias.

the alias like:

alias configure='cd /opt/test/conf/server'

i want replace /opt/test/conf/server /opt/test/conf having difficulties syntax.

thanks help.

cat my_bash_file.sh | sed 's#/opt/test/conf/server#/opt/test/conf#g'

shell sed

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -