<?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 command cannot be parsed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622321#M925962</link>
    <description>Shane,&lt;BR /&gt;&lt;BR /&gt;It would help if you can give your BUILD_ID_FILE and let us know what you are trying to do.&lt;BR /&gt;&lt;BR /&gt;To replace something with a variable  you will need to use ' (single quotes) not the double quotes "&lt;BR /&gt;&lt;BR /&gt;for ex., yours would be&lt;BR /&gt;&lt;BR /&gt;sed 's/build.rev/build.rev = '$BUILD_ID'/' $BUILD_ID_FILE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
    <pubDate>Thu, 29 Nov 2001 18:05:04 GMT</pubDate>
    <dc:creator>Sridhar Bhaskarla</dc:creator>
    <dc:date>2001-11-29T18:05:04Z</dc:date>
    <item>
      <title>sed command cannot be parsed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622320#M925961</link>
      <description>All,&lt;BR /&gt;I have a sed command that works fine on both Solaris and Linux, but fails on HP-UX. It is for a nightly build process, and is the last piece that I need to port. I am not extremely familiar with sed, so bombard me with corrections! :D&lt;BR /&gt;&lt;BR /&gt;The sed statement is:&lt;BR /&gt;sed '/build.rev/c\build.rev = '"$BUILD_ID"'' $BUILD_ID_FILE &amp;gt; $BUILD_ID_FILE.1&lt;BR /&gt;&lt;BR /&gt;I had our admin apply both PHCO_22800 (sed cumulative patch) and PHCO_22760 (libc cumulative patch), but it did not help. &lt;BR /&gt;If there are any other sed related patches I can apply, let me know as well. &lt;BR /&gt;--&lt;BR /&gt;Shane</description>
      <pubDate>Thu, 29 Nov 2001 17:58:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622320#M925961</guid>
      <dc:creator>Shane Coombs</dc:creator>
      <dc:date>2001-11-29T17:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: sed command cannot be parsed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622321#M925962</link>
      <description>Shane,&lt;BR /&gt;&lt;BR /&gt;It would help if you can give your BUILD_ID_FILE and let us know what you are trying to do.&lt;BR /&gt;&lt;BR /&gt;To replace something with a variable  you will need to use ' (single quotes) not the double quotes "&lt;BR /&gt;&lt;BR /&gt;for ex., yours would be&lt;BR /&gt;&lt;BR /&gt;sed 's/build.rev/build.rev = '$BUILD_ID'/' $BUILD_ID_FILE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Thu, 29 Nov 2001 18:05:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622321#M925962</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-11-29T18:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: sed command cannot be parsed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622322#M925963</link>
      <description>You're not executing the sed c command properly - you need to put a line feed after the \:&lt;BR /&gt;&lt;BR /&gt;sed '/build.rev/cbuild.rev = '"$BUILD_ID"'' $BUILD_ID_FILE &amp;gt; $BUILD_ID_FILE.1&lt;BR /&gt;&lt;BR /&gt;BTW the last two '' aren't required :-)&lt;BR /&gt;&lt;BR /&gt;dave</description>
      <pubDate>Thu, 29 Nov 2001 18:05:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622322#M925963</guid>
      <dc:creator>David Lodge</dc:creator>
      <dc:date>2001-11-29T18:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: sed command cannot be parsed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622323#M925964</link>
      <description>oops sorry looks like the parse has got rid of the backslash:&lt;BR /&gt;&lt;BR /&gt;sed '/build.rev/c\build.rev = '"$BUILD_ID"'' $BUILD_ID_FILE &amp;gt; $BUILD_ID_FILE.1</description>
      <pubDate>Thu, 29 Nov 2001 18:06:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622323#M925964</guid>
      <dc:creator>David Lodge</dc:creator>
      <dc:date>2001-11-29T18:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: sed command cannot be parsed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622324#M925965</link>
      <description>The build file is:&lt;BR /&gt;#&lt;BR /&gt;# This file contains the base and custom revision numbers.&lt;BR /&gt;# Needs to be checked out and updated during the nightly&lt;BR /&gt;# build process.&lt;BR /&gt;build.rev = 1332&lt;BR /&gt;custom.rev = 1285&lt;BR /&gt;&lt;BR /&gt;Very simple file. The line that needs to replaced is being replaced with an environment variable that is the 2-digit year plus Julian date, with the leading zero stripped, e.g., 01 + 332 = 1332.&lt;BR /&gt;&lt;BR /&gt;I tried each command listed and got command cannot be parsed for two of them.&lt;BR /&gt;Basically, I do not know the entire line value in the file prior to the build process. If I did, I could use the 's' and substitute, but I used 'c\' to change instead. I need to grab the line that starts with /build.rev/ and replace the entire line with this:&lt;BR /&gt;build.rev = $NEW_BUILD_ID&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-- &lt;BR /&gt;Shane</description>
      <pubDate>Thu, 29 Nov 2001 19:21:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622324#M925965</guid>
      <dc:creator>Shane Coombs</dc:creator>
      <dc:date>2001-11-29T19:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: sed command cannot be parsed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622325#M925966</link>
      <description>OK, after adding the line feed, it executes, but it still isn't placing the new BUILD_ID in the new file. It retained the old value from the file. So it basically copied the file into another file. However, I may be able to make it work from there. Any more suggestions are gladly welcomed, guys. And thanks.&lt;BR /&gt;--&lt;BR /&gt;Shane</description>
      <pubDate>Thu, 29 Nov 2001 19:33:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622325#M925966</guid>
      <dc:creator>Shane Coombs</dc:creator>
      <dc:date>2001-11-29T19:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: sed command cannot be parsed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622326#M925967</link>
      <description>Someone had set the environment variable to the same value in the file! So it did work once the line feed was added. Wierd that Solaris seems to inject the line feed, and Gnu sed on Linux had no trouble, but I will verify both of those are identical to this situation. Thanks for the help, guys. &lt;BR /&gt;Problem solved, monkey off back, smile on face...&lt;BR /&gt;--&lt;BR /&gt;Shane</description>
      <pubDate>Thu, 29 Nov 2001 19:41:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-cannot-be-parsed/m-p/2622326#M925967</guid>
      <dc:creator>Shane Coombs</dc:creator>
      <dc:date>2001-11-29T19:41:18Z</dc:date>
    </item>
  </channel>
</rss>

