<?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 Need some help in expect scripting in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-some-help-in-expect-scripting/m-p/3928272#M97252</link>
    <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have written one expect script to collect the dmesg and bt command output when machine is in kdb mode . But i want the script to check the condition that if get the kdb prompt then do the following steps or else pass one value to one file get out from script&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/expect&lt;BR /&gt;set console CONSOLE&lt;BR /&gt;set port APORT&lt;BR /&gt;&lt;BR /&gt;spawn telnet $console&lt;BR /&gt;sleep 2&lt;BR /&gt;send "\r"&lt;BR /&gt;expect "number:" {send $port\r}&lt;BR /&gt;sleep 0.5&lt;BR /&gt;send "\r"&lt;BR /&gt;expect kdb&amp;gt; {send bt\r}&lt;BR /&gt;send "dmesg 20\r"&lt;BR /&gt;sleep 5&lt;BR /&gt;expect eof&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help me in this ?&lt;BR /&gt;Thanks</description>
    <pubDate>Thu, 18 Jan 2007 07:19:08 GMT</pubDate>
    <dc:creator>anirudhasonar</dc:creator>
    <dc:date>2007-01-18T07:19:08Z</dc:date>
    <item>
      <title>Need some help in expect scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-some-help-in-expect-scripting/m-p/3928272#M97252</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have written one expect script to collect the dmesg and bt command output when machine is in kdb mode . But i want the script to check the condition that if get the kdb prompt then do the following steps or else pass one value to one file get out from script&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/expect&lt;BR /&gt;set console CONSOLE&lt;BR /&gt;set port APORT&lt;BR /&gt;&lt;BR /&gt;spawn telnet $console&lt;BR /&gt;sleep 2&lt;BR /&gt;send "\r"&lt;BR /&gt;expect "number:" {send $port\r}&lt;BR /&gt;sleep 0.5&lt;BR /&gt;send "\r"&lt;BR /&gt;expect kdb&amp;gt; {send bt\r}&lt;BR /&gt;send "dmesg 20\r"&lt;BR /&gt;sleep 5&lt;BR /&gt;expect eof&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help me in this ?&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 18 Jan 2007 07:19:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-some-help-in-expect-scripting/m-p/3928272#M97252</guid>
      <dc:creator>anirudhasonar</dc:creator>
      <dc:date>2007-01-18T07:19:08Z</dc:date>
    </item>
  </channel>
</rss>

