<?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 sed and c-shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462541#M728124</link>
    <description>I am trying to change a line in some files after I have received them via ftp. It's a pretty simple edit, but I can't seem to get it to work. Following is the line in the file I'm trying to change:&lt;BR /&gt;&lt;IMG src="https://community.hpe.com/SHbe1820.jpg" width="250" height="55" /&gt;&lt;BR /&gt;The file name "SHbe1820.jpg" changes with each file I get and on a daily basis.&lt;BR /&gt;Following is the line in my sed script:&lt;BR /&gt;s/img src="*.jpg/img src="{!=VW_UCntx.getDocsURL()!}/images/complogo.jpg/g&lt;BR /&gt;Can anyone tell me what I'm doing wrong?&lt;BR /&gt;Thanks!</description>
    <pubDate>Tue, 07 Nov 2000 18:13:33 GMT</pubDate>
    <dc:creator>Maureen Gunkel</dc:creator>
    <dc:date>2000-11-07T18:13:33Z</dc:date>
    <item>
      <title>sed and c-shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462541#M728124</link>
      <description>I am trying to change a line in some files after I have received them via ftp. It's a pretty simple edit, but I can't seem to get it to work. Following is the line in the file I'm trying to change:&lt;BR /&gt;&lt;IMG src="https://community.hpe.com/SHbe1820.jpg" width="250" height="55" /&gt;&lt;BR /&gt;The file name "SHbe1820.jpg" changes with each file I get and on a daily basis.&lt;BR /&gt;Following is the line in my sed script:&lt;BR /&gt;s/img src="*.jpg/img src="{!=VW_UCntx.getDocsURL()!}/images/complogo.jpg/g&lt;BR /&gt;Can anyone tell me what I'm doing wrong?&lt;BR /&gt;Thanks!</description>
      <pubDate>Tue, 07 Nov 2000 18:13:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462541#M728124</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2000-11-07T18:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: sed and c-shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462542#M728125</link>
      <description>Maureen,&lt;BR /&gt;&lt;BR /&gt;Could you put the line in question in a file and append it to a post in this thread.&lt;BR /&gt;&lt;BR /&gt;It looks a kind of complicated (and maybe some characters got lost).&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik</description>
      <pubDate>Tue, 07 Nov 2000 18:32:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462542#M728125</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2000-11-07T18:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: sed and c-shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462543#M728126</link>
      <description>Here it is!</description>
      <pubDate>Tue, 07 Nov 2000 18:41:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462543#M728126</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2000-11-07T18:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: sed and c-shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462544#M728127</link>
      <description>Assumption made:&lt;BR /&gt; every day you get which file to replace with what and its new path.&lt;BR /&gt;&lt;BR /&gt;Based on the above,&lt;BR /&gt;sed 's/somefile.jpg//newlocation/subdirectory/otherfile.jpg/g' test.old &amp;gt; tests.html&lt;BR /&gt;&lt;BR /&gt;To hint you . is treated as any character in the regular expression you are searching for, Incase if your reg-exp has / to be searched or replace you need to prefix with  to negate the meaning what sed has. &lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;......Madhu&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Nov 2000 18:42:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462544#M728127</guid>
      <dc:creator>Madhu Sudhan_1</dc:creator>
      <dc:date>2000-11-07T18:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: sed and c-shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462545#M728128</link>
      <description>Two things:&lt;BR /&gt;1) You need to wildcard more specifically in sed.  '*' just menas any number of the preceding character.  '.*' gets you what you want.&lt;BR /&gt;2) You cannot use / within a replacement string if you are using it as teh string delimiter.  You can get around this by escaping the / with \ inside the replacement, but that gets ugly pretty quickly.  I find it cleaner to simply use another character as my string delimiter in sch situations.  In the example below, I have used %.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sed 's%img src=".*.jpg%img src="{!=VW_UCntx.getDocsURL()!}/images/complogo.jpg%g'</description>
      <pubDate>Tue, 07 Nov 2000 18:43:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462545#M728128</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-11-07T18:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: sed and c-shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462546#M728129</link>
      <description>Maureen : Looked at the attachment, when you prefix  with  *, It literally looks for character "*" not for anything. &lt;BR /&gt;&lt;BR /&gt;Thanks, &lt;BR /&gt;Madhu</description>
      <pubDate>Tue, 07 Nov 2000 18:51:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462546#M728129</guid>
      <dc:creator>Madhu Sudhan_1</dc:creator>
      <dc:date>2000-11-07T18:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: sed and c-shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462547#M728130</link>
      <description>Alan:&lt;BR /&gt;&lt;BR /&gt;Thank you, thank you, thank you.  Works like a charm. My butt is now off the 'hot seat'!&lt;BR /&gt;&lt;BR /&gt;Mo</description>
      <pubDate>Tue, 07 Nov 2000 18:59:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-and-c-shell-script/m-p/2462547#M728130</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2000-11-07T18:59:48Z</dc:date>
    </item>
  </channel>
</rss>

