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

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -