<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sed help require in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sed-help-require/m-p/5142370#M62733</link>
    <description>Thanks for nice help Steven Schwada</description>
    <pubDate>Tue, 25 Nov 2008 11:51:23 GMT</pubDate>
    <dc:creator>Maaz</dc:creator>
    <dc:date>2008-11-25T11:51:23Z</dc:date>
    <item>
      <title>sed help require</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-help-require/m-p/5142368#M62731</link>
      <description>I want to replace the value of a variable  'TIMEZONE' with the other string, for that I tried to use 'sed', but no success, please help .&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;CLOCK=/etc/sysconfig/clock&lt;BR /&gt;TIMEZONE=$(grep ^TIMEZONE $CLOCK)&lt;BR /&gt;&lt;BR /&gt;if [ $TIMEZONE != TIMEZONE=\"Etc/GMT-5\" ]; then&lt;BR /&gt;cp $CLOCK /tmp/clock &lt;BR /&gt;cat /tmp/clock | sed 's/'$TIMEZONE'/TIMEZONE="Etc/GMT-5"/g' &amp;gt; $CLOCK&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# bash -x sedclock.sh&lt;BR /&gt;+ CLOCK=/etc/sysconfig/clock&lt;BR /&gt;++ grep '^TIMEZONE' /etc/sysconfig/clock&lt;BR /&gt;+ TIMEZONE='TIMEZONE="Etc/GMT-4"'&lt;BR /&gt;+ '[' 'TIMEZONE="Etc/GMT-4"' '!=' 'TIMEZONE="Etc/GMT-5"' ']'&lt;BR /&gt;+ cp /etc/sysconfig/clock /tmp/clock&lt;BR /&gt;+ cat /tmp/clock&lt;BR /&gt;+ sed 's/TIMEZONE="Etc/GMT-4"/TIMEZONE="Etc/GMT-5"/g'&lt;BR /&gt;sed: -e expression #1, char 24: unknown option to `s'&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Sat, 22 Nov 2008 08:35:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-help-require/m-p/5142368#M62731</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2008-11-22T08:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: sed help require</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-help-require/m-p/5142369#M62732</link>
      <description>&lt;!--!*#--&gt;Just looking, not trying anything, I'd say&lt;BR /&gt;that using "/" as the delimiter in your "sed"&lt;BR /&gt;"s" command is not a good idea when your&lt;BR /&gt;strings contain "/" characters.  Something&lt;BR /&gt;like this might be closer:&lt;BR /&gt;&lt;BR /&gt;sed -e 's|'$TIMEZONE'|TIMEZONE="Etc/GMT-5"|'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You really think that the "g" is needed?</description>
      <pubDate>Sat, 22 Nov 2008 09:15:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-help-require/m-p/5142369#M62732</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-11-22T09:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: sed help require</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-help-require/m-p/5142370#M62733</link>
      <description>Thanks for nice help Steven Schwada</description>
      <pubDate>Tue, 25 Nov 2008 11:51:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-help-require/m-p/5142370#M62733</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2008-11-25T11:51:23Z</dc:date>
    </item>
  </channel>
</rss>

