<?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 giving an error in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165875#M90807</link>
    <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; By mistake in HP UX, I have changed the owner and gid of all the files. After that I did run swverify \* ...I want to merge 1st and 2nd line, 3rd and 4th line ...&lt;BR /&gt;&lt;BR /&gt;If you are trying to correct the permissions and ownership, you can use 'swverify' to do this!&lt;BR /&gt;&lt;BR /&gt;# swverify -F \*&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
    <pubDate>Fri, 21 Mar 2008 18:06:39 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-03-21T18:06:39Z</dc:date>
    <item>
      <title>sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165869#M90801</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Will somebody please help me ?&lt;BR /&gt;When I execute this ....&lt;BR /&gt; paste -s -d"^m" swagent.log | sed '{s/\"\./\"\.\n/g}' &amp;gt; swagent.new&lt;BR /&gt;I get following error.&lt;BR /&gt;sed: Function {s/\"\./\"\.\n/g} cannot be parsed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. This thread has been moved from &amp;nbsp;HP-UX&amp;gt;General to HP-UX &amp;gt; languages. -HP Forum Moderator&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2014 10:04:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165869#M90801</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2014-01-20T10:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165870#M90802</link>
      <description>HI:&lt;BR /&gt;&lt;BR /&gt;Drop the curly braces:&lt;BR /&gt;&lt;BR /&gt;# sed 's/\"\./\"\.\n/g'&lt;BR /&gt;&lt;BR /&gt;That said, what are you attempting to do?  On HP-UX there is 'ux2dos' and 'dos2ux' to convert between Unix and DOS (Windows) line terminations.  See the manpages for 'dos2ux'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 21 Mar 2008 15:29:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165870#M90802</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-21T15:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165871#M90803</link>
      <description>As JRF says, drop the {}.  But if you really really want them, I think you need a ";" before the "}".&lt;BR /&gt;&lt;BR /&gt;You also seem to have a "\" before the double quote.  This isn't needed and may mess you up.&lt;BR /&gt;&lt;BR /&gt;You might explain what you are doing.  You seem to be adding CRs.  Then you seem to be adding newlines but not after the CRs, after '".'.</description>
      <pubDate>Fri, 21 Mar 2008 17:14:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165871#M90803</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-21T17:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165872#M90804</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks for quick response.&lt;BR /&gt;&lt;BR /&gt;When I tried this without {}&lt;BR /&gt;&lt;BR /&gt;This is the error&lt;BR /&gt;&lt;BR /&gt;paste -s -d"^m" swagent.log | sed 's/\"\./\"\.\N/g'  &amp;gt; swagent.new&lt;BR /&gt;&lt;BR /&gt;Error which I got :--&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sed: Memory allocation failed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Mar 2008 17:32:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165872#M90804</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2008-03-21T17:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165873#M90805</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; sed: Memory allocation failed.&lt;BR /&gt;&lt;BR /&gt;Again, exactly what is your objective?&lt;BR /&gt;&lt;BR /&gt;Your command creates one HUGH single-line file that is longer than your 'sed' buffers can tolerate.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 21 Mar 2008 17:44:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165873#M90805</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-21T17:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165874#M90806</link>
      <description>By mistake in HP UX, Ihave changed the owner and gid of all the files.&lt;BR /&gt;After that I did run swverify \*&lt;BR /&gt;It generated a log file.&lt;BR /&gt;Please find attached doc.&lt;BR /&gt;&lt;BR /&gt;I want to merge 1st and 2nd line, 3rd and 4th line ...........&lt;BR /&gt;&lt;BR /&gt;That is why I'm using sed&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Mar 2008 17:59:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165874#M90806</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2008-03-21T17:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165875#M90807</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; By mistake in HP UX, I have changed the owner and gid of all the files. After that I did run swverify \* ...I want to merge 1st and 2nd line, 3rd and 4th line ...&lt;BR /&gt;&lt;BR /&gt;If you are trying to correct the permissions and ownership, you can use 'swverify' to do this!&lt;BR /&gt;&lt;BR /&gt;# swverify -F \*&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Mar 2008 18:06:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165875#M90807</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-21T18:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165876#M90808</link>
      <description>Thx,&lt;BR /&gt;I was not knowing this.&lt;BR /&gt;&lt;BR /&gt;Will this fix errors?&lt;BR /&gt;How can I fix these errors ?</description>
      <pubDate>Fri, 21 Mar 2008 18:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165876#M90808</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2008-03-21T18:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165877#M90809</link>
      <description>&amp;gt;I want to merge 1st and 2nd line, 3rd and 4th line&lt;BR /&gt;&lt;BR /&gt;If you want to do this, use awk:&lt;BR /&gt;awk '&lt;BR /&gt;{&lt;BR /&gt;getline second&lt;BR /&gt;print $0, second&lt;BR /&gt;}' swagent.log&lt;BR /&gt;&lt;BR /&gt;You can use sed but it's much harder to understand/remember:&lt;BR /&gt;sed -e 'N; s/\n/ /' swagent.log</description>
      <pubDate>Fri, 21 Mar 2008 18:21:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165877#M90809</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-21T18:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165878#M90810</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;From the 'swverify(1M)' manpages:&lt;BR /&gt;&lt;BR /&gt;"-F Runs vendor-specific fix scripts to correct and report problems on installed software.  The fix script can create missind directories, correct file modifications (mode, owner, group, major, and minor), and recreate symbolic links."&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Mar 2008 18:22:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165878#M90810</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-21T18:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165879#M90811</link>
      <description>&amp;gt;Will this fix errors?&lt;BR /&gt;&lt;BR /&gt;The ones you listed, yes.</description>
      <pubDate>Fri, 21 Mar 2008 18:22:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165879#M90811</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-21T18:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165880#M90812</link>
      <description>It gave some errors while executing.&lt;BR /&gt;&lt;BR /&gt;Please refer attachment.&lt;BR /&gt;&lt;BR /&gt;Which is that script file ?&lt;BR /&gt;&lt;BR /&gt;If i change the permission of that script file alone manually will it fix error ?&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Mar 2008 18:27:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165880#M90812</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2008-03-21T18:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165881#M90813</link>
      <description>&amp;gt;It gave some errors while executing.&lt;BR /&gt;&lt;BR /&gt;Of course it did.  The same ones you got before.  But it should have fixed them.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Which is that script file?&lt;BR /&gt;&lt;BR /&gt;You tell us.  You would need to look at the swverify.log.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;If i change the permission of that script file alone manually will it fix error?&lt;BR /&gt;&lt;BR /&gt;Without more details, we can't tell.  You could try "swverify -F \*" a second time to see if it has already fixed the problems.</description>
      <pubDate>Fri, 21 Mar 2008 18:38:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165881#M90813</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-21T18:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165882#M90814</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I executed swverify -F\* again.&lt;BR /&gt;It did fix the errors which was there earlier.&lt;BR /&gt;&lt;BR /&gt;But is there any way I can fix the ownership issue of other files like &lt;BR /&gt;/etc/..&lt;BR /&gt;/dev/..&lt;BR /&gt;/usr/..&lt;BR /&gt;&lt;BR /&gt;I feel it has fixed only package/sw files errors, not system files&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Mar 2008 19:01:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165882#M90814</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2008-03-21T19:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165883#M90815</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; But is there any way I can fix the ownership issue of other files like &lt;BR /&gt;/etc/..&lt;BR /&gt;/dev/..&lt;BR /&gt;/usr/..&lt;BR /&gt;&lt;BR /&gt;If you mean the permissions and ownership of these DIRECTORIES, then&lt;BR /&gt;&lt;BR /&gt;# chmod 555 /etc /dev /usr&lt;BR /&gt;# chown bin:bin /etc /dev /usr&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 21 Mar 2008 19:10:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165883#M90815</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-21T19:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165884#M90816</link>
      <description>I didnt mean the directories alone.&lt;BR /&gt;&lt;BR /&gt;The files in those directories. For ex..&lt;BR /&gt;&lt;BR /&gt;/etc/passwd, /etc/inittab, /var/adm/syslog/....&lt;BR /&gt;There are somany device files too with wrong ownership.&lt;BR /&gt;&lt;BR /&gt;Is there any method I can find this ownership details from some other system and put the same in this server.&lt;BR /&gt;&lt;BR /&gt;As you know doing one by one is near impossible.</description>
      <pubDate>Fri, 21 Mar 2008 19:21:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165884#M90816</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2008-03-21T19:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165885#M90817</link>
      <description>&amp;gt;I feel it has fixed only package/sw files errors, not system files&lt;BR /&gt;&lt;BR /&gt;That's correct.  It only fixes files recorded in the IPD.  You'll have to correct those other files/directories.&lt;BR /&gt;You would need to look at another system for the correct values.</description>
      <pubDate>Fri, 21 Mar 2008 19:26:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165885#M90817</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-21T19:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165886#M90818</link>
      <description>If I'm not wrong, the permission of each file will be different in any given directory.&lt;BR /&gt;&lt;BR /&gt;how can I bring back those settings ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Mar 2008 19:27:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165886#M90818</guid>
      <dc:creator>srnagu</dc:creator>
      <dc:date>2008-03-21T19:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165887#M90819</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; If I'm not wrong, the permission of each file will be different in any given directory.&lt;BR /&gt;&lt;BR /&gt;True.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; how can I bring back those settings ?&lt;BR /&gt;&lt;BR /&gt;You could the broken server directory contents to that of a known good one.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 21 Mar 2008 20:00:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165887#M90819</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-21T20:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: sed command giving an error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165888#M90820</link>
      <description>&amp;gt;how can I bring back those settings?&lt;BR /&gt;&lt;BR /&gt;From your backup of course.  ;-)&lt;BR /&gt;&lt;BR /&gt;Otherwise you would have to compare with another system and either manually or with a script, fix them.&lt;BR /&gt;&lt;BR /&gt;I suppose you could use swpackage on your good system to create a dummy product, then copy the IPD entries to your new system and then use swverify -F.&lt;BR /&gt;&lt;BR /&gt;Of course this may be harder than writing a script from scratch.  :-)</description>
      <pubDate>Fri, 21 Mar 2008 20:07:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sed-command-giving-an-error/m-p/4165888#M90820</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-21T20:07:23Z</dc:date>
    </item>
  </channel>
</rss>

