<?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: Expect script help... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-help/m-p/5250610#M658486</link>
    <description>One small clarification. I want the formatting of output to happen with in the same script and only the final formatted output displayed on screen.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Karthik S S</description>
    <pubDate>Fri, 06 Aug 2010 11:58:10 GMT</pubDate>
    <dc:creator>Karthik S S</dc:creator>
    <dc:date>2010-08-06T11:58:10Z</dc:date>
    <item>
      <title>Expect script help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-help/m-p/5250609#M658485</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have the following expect script:&lt;BR /&gt;###########################################&lt;BR /&gt;#!/usr/bin/expect -f&lt;BR /&gt;set password [lrange $argv 0 0]&lt;BR /&gt;set ipaddr [lrange $argv 1 1]&lt;BR /&gt;set arg1 [lrange $argv 3 3]&lt;BR /&gt;set timeout -1&lt;BR /&gt;set prompt "$"&lt;BR /&gt;spawn ssh user@$ipaddr&lt;BR /&gt;match_max 100000&lt;BR /&gt;expect "*?assword:*"&lt;BR /&gt;send -- "$password\r"&lt;BR /&gt;expect -re $prompt&lt;BR /&gt;send -- "somecommand\r"&lt;BR /&gt;expect -re $prompt&lt;BR /&gt;###########################################&lt;BR /&gt;&lt;BR /&gt;Which when executed gives the output something like this:&lt;BR /&gt;&lt;BR /&gt;./myexpectscript ipaddr password&lt;BR /&gt;###########################################&lt;BR /&gt;Some text..&lt;BR /&gt;Some more text...&lt;BR /&gt;Properties:&lt;BR /&gt; var1 = my&lt;BR /&gt; var2 = dont_need_this&lt;BR /&gt; var3 = name&lt;BR /&gt; var4 = is&lt;BR /&gt; var5 = karthik&lt;BR /&gt;###########################################&lt;BR /&gt;&lt;BR /&gt;Instead I want the selected portion of the o/p to be formatted and displayed like this:&lt;BR /&gt;&lt;BR /&gt;| my | name | is | karthik |&lt;BR /&gt;&lt;BR /&gt;Appreciate any help on this&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Karthik S S</description>
      <pubDate>Fri, 06 Aug 2010 11:53:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-help/m-p/5250609#M658485</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2010-08-06T11:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expect script help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-help/m-p/5250610#M658486</link>
      <description>One small clarification. I want the formatting of output to happen with in the same script and only the final formatted output displayed on screen.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Karthik S S</description>
      <pubDate>Fri, 06 Aug 2010 11:58:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-help/m-p/5250610#M658486</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2010-08-06T11:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Expect script help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-help/m-p/5250611#M658487</link>
      <description>This helped...&lt;BR /&gt;&lt;A href="http://forums.whirlpool.net.au/forum-replies-archive.cfm/793887.html" target="_blank"&gt;http://forums.whirlpool.net.au/forum-replies-archive.cfm/793887.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;Karthik</description>
      <pubDate>Fri, 06 Aug 2010 13:22:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-help/m-p/5250611#M658487</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2010-08-06T13:22:26Z</dc:date>
    </item>
  </channel>
</rss>

