Reputation: 5420
So I am trying to use a simple sed command in shell to find and replace a certain string in my bash file for an alias.
The alias is something like:
alias configure='cd /opt/Test/conf/server'
I want to replace /opt/Test/conf/server with /opt/Test/conf but am having difficulties with the syntax.
Thanks for any help.
Upvotes: 1
Views: 242
Reputation: 13924
cat my_bash_file.sh | sed 's#/opt/Test/conf/server#/opt/Test/conf#g'
Upvotes: 1