1751781 Members
4405 Online
108781 Solutions
New Discussion

Re: sed help please

 
SOLVED
Go to solution
Maaz
Valued Contributor

Re: sed help please

Hi thanks Fredrik.eriksson

in my previous post, I wrote
>but following works
# sed -i 's/TIMEZONE=\".*\"/TIMEZONE="Asia\/Tashkent/' /etc/sysconfig/clock

I didnt notice then, the above sed command doesnt close the quotes in /etc/sysconfig/clock

after running the above sed
grep ^TIMEZONE /etc/sysconfig/clock
TIMEZONE="Asia/Tashkent

you can see that closing quotes are missing
but following definitely works ;)
sed -i "s/TIMEZONE=\".*\"/TIMEZONE=\"Asia\/Tashkent\"/" /etc/sysconfig/clock

Thanks :)