0

I have a file that has the variable in it like this :

destination=/usr/src/test

I want with the sed command, change the content of the destination variable to become like this : destination=/etc/app

for this i used : sed -i 's/destination=./destination=/etc/app/' nameoffile*

but I had this mistake : sed: -e expression #1, char 29: unknown option to `s'

any solution !!

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
lystack
  • 41
  • 4

1 Answers1

0

You missed the regex separators.

Try changing your command as follow:

sed -i -r 's:destination=.*:destination=/etc/app:g' nameoffile
Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74