<?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 question? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174761#M682264</link>
    <description>Thanks James,&lt;BR /&gt;&lt;BR /&gt;Question - Can you explain a little bit why \$d is needed for remote hosts ?&lt;BR /&gt;&lt;BR /&gt;Allan.</description>
    <pubDate>Tue, 12 May 2009 19:07:20 GMT</pubDate>
    <dc:creator>Allanm</dc:creator>
    <dc:date>2009-05-12T19:07:20Z</dc:date>
    <item>
      <title>sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174755#M682258</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;#ssh host1 sed '$d' /root/hosts &amp;gt; /etc/hosts&lt;BR /&gt;sed: -e expression #1, char 8: Extra characters after command&lt;BR /&gt;&lt;BR /&gt;How to use sed thru ssh on a remote host?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
      <pubDate>Tue, 12 May 2009 18:46:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174755#M682258</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-05-12T18:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174756#M682259</link>
      <description>Have you tried quoting the command?&lt;BR /&gt;&lt;BR /&gt;#ssh host1 "sed '$d' /root/hosts &amp;gt; /etc/hosts"</description>
      <pubDate>Tue, 12 May 2009 18:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174756#M682259</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-05-12T18:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174757#M682260</link>
      <description>Yes tried but didnt work.</description>
      <pubDate>Tue, 12 May 2009 18:55:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174757#M682260</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-05-12T18:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174758#M682261</link>
      <description>Hi Allan:&lt;BR /&gt;&lt;BR /&gt;# ssh -n host1 'sed "$d" /root/hosts &amp;gt; /etc/hosts'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 12 May 2009 18:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174758#M682261</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-05-12T18:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174759#M682262</link>
      <description>Hi (again) Allanm:&lt;BR /&gt;&lt;BR /&gt;Sorry, that should be:&lt;BR /&gt;&lt;BR /&gt;# ssh -n host1 'sed "\$d" /root/hosts &amp;gt; /etc/hosts'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 12 May 2009 19:02:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174759#M682262</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-05-12T19:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174760#M682263</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Please remember to evaulate the answers you received, here, too:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1335006" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1335006&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 12 May 2009 19:04:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174760#M682263</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-05-12T19:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174761#M682264</link>
      <description>Thanks James,&lt;BR /&gt;&lt;BR /&gt;Question - Can you explain a little bit why \$d is needed for remote hosts ?&lt;BR /&gt;&lt;BR /&gt;Allan.</description>
      <pubDate>Tue, 12 May 2009 19:07:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174761#M682264</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-05-12T19:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174762#M682265</link>
      <description>Hi Allanm:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Question - Can you explain a little bit why \$d is needed for remote hosts ?&lt;BR /&gt;&lt;BR /&gt;We escape the dollar-sign so that the shell doesn't attempt to evaluate $d as a variable, but rather leave that for 'sed' to interpret.&lt;BR /&gt;&lt;BR /&gt;You can see this if you compare:&lt;BR /&gt;&lt;BR /&gt;# sed "$d" /root/hosts&lt;BR /&gt;&lt;BR /&gt;...and:&lt;BR /&gt;&lt;BR /&gt;# sed "\$d" /root/hosts&lt;BR /&gt;&lt;BR /&gt;...which is why if we wrote this to run locally, we could do:&lt;BR /&gt;&lt;BR /&gt;# sed '$d' /root/hosts&lt;BR /&gt;&lt;BR /&gt;...with the sinqle quotes so that the shell doesn't try to evaluate the $.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 12 May 2009 19:14:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174762#M682265</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-05-12T19:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: sed question?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174763#M682266</link>
      <description>Exellent, Thanks JRF!</description>
      <pubDate>Tue, 12 May 2009 19:16:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-question/m-p/5174763#M682266</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-05-12T19:16:30Z</dc:date>
    </item>
  </channel>
</rss>

