i have a problem with my sed command. I have the following file and want to replace line number 4.
text.txt content:
1 Hi World!
2 Okey
3 Test
4 ;date.timezone =
cmd command:
sed -i -e "s/;date.timezone =/date.timezone = Europe/Berlin/" text.txt
Because my replacement holds a / inside, the sed command cant execute properly because of Europe/Berlin
.
My Folder Structure:
folder structrure
/Users/user/dev/repos/docker
└── text.txt
My fix would be to ignore the / between Europe and Berlin. I didn't really find the answer in the web, that's why I reach out for you?
Output:
sed: 1: "s/;date.timezone =/date ...": bad flag in substitute command: 'B'