<?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: Script error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133062#M688518</link>
    <description>Adam,&lt;BR /&gt;&lt;BR /&gt;for what its worth, the script you attached did not generate the syntax errors you reported....so i've got nothin for you</description>
    <pubDate>Wed, 01 Oct 2008 19:21:06 GMT</pubDate>
    <dc:creator>OldSchool</dc:creator>
    <dc:date>2008-10-01T19:21:06Z</dc:date>
    <item>
      <title>Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133049#M688505</link>
      <description>I found this script on one of the threads and thought it would be very usful to track the amount of data coming into my lan. However, I get the below error everytime I try to run it. Can someone help?&lt;BR /&gt;&lt;BR /&gt;# vi lanaction.sh &lt;BR /&gt;"lanaction.sh" [Read only] 29 lines, 385 characters &lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;#################################&lt;BR /&gt;# CURRENTLY IN PROGRESS&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;#################################&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;function lanad&lt;BR /&gt;{&lt;BR /&gt;lanadmin&amp;lt;&amp;lt; EOF &amp;gt;/tmp/t 2&amp;gt;&amp;amp;1&lt;BR /&gt;lan&lt;BR /&gt;display&lt;BR /&gt;&lt;BR /&gt;quit&lt;BR /&gt;EOF&lt;BR /&gt;cat /tmp/t|grep Inbound|grep Oct|awk '{print $4}'&lt;BR /&gt;}&lt;BR /&gt;echo "Inbound Bytes per second on default lan interface"&lt;BR /&gt;let z=0&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;sleep 1&lt;BR /&gt;let x=$(lanad)&lt;BR /&gt;let t=$x-$z&lt;BR /&gt;echo $t&lt;BR /&gt;let z=$x&lt;BR /&gt;done&lt;BR /&gt;:q!&lt;BR /&gt;# sh lanaction.sh&lt;BR /&gt;lanaction.sh[10]: Syntax error at line 12 : `&amp;lt;&amp;lt;' is not matched.&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Oct 2008 13:58:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133049#M688505</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-10-01T13:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133050#M688506</link>
      <description>You have a space between the "&amp;lt;&amp;lt;" and "EOF"</description>
      <pubDate>Wed, 01 Oct 2008 14:11:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133050#M688506</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-10-01T14:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133051#M688507</link>
      <description>I removed the space but get the same error.</description>
      <pubDate>Wed, 01 Oct 2008 14:19:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133051#M688507</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-10-01T14:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133052#M688508</link>
      <description>&amp;gt;but get the same error.&lt;BR /&gt;&lt;BR /&gt;Is "EOF" in column 1?</description>
      <pubDate>Wed, 01 Oct 2008 14:26:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133052#M688508</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-10-01T14:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133053#M688509</link>
      <description>the E in the second EOF isn't the first character in the line??&lt;BR /&gt;&lt;BR /&gt;you need:&lt;BR /&gt;&lt;BR /&gt;lanadmin &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;.&lt;BR /&gt;...your stuff here..&lt;BR /&gt;.&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;-EOF can be used if the second EOF is preceded by one (or more???) tabs</description>
      <pubDate>Wed, 01 Oct 2008 14:28:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133053#M688509</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-10-01T14:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133054#M688510</link>
      <description>That whole lanad function looks a bit "round the houses" to me - how about replacing it with something a little simpler:&lt;BR /&gt;&lt;BR /&gt;function lanad&lt;BR /&gt;{&lt;BR /&gt;echo "lan\ndisplay\n\nquit" | lanadmin 2&amp;gt;&amp;amp;1 | awk '/Inbound Octets/ {print $4}'&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Wed, 01 Oct 2008 14:31:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133054#M688510</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2008-10-01T14:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133055#M688511</link>
      <description>Incidentally another "problem" with this script is that it will only print stats for the "default" lan interface for lanadmin (which is defined as the first one you see when you run lanscan). That might not be the interface you are actually using...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Wed, 01 Oct 2008 14:38:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133055#M688511</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2008-10-01T14:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133056#M688512</link>
      <description>Duncan your suggestion worked wonderfully.&lt;BR /&gt;&lt;BR /&gt;I am still a bit confused as to why the original doesn't work though. The second "EOF" is the first character in that line, so even though yours worked well duncan, I would still like to know where I messed up the first time.</description>
      <pubDate>Wed, 01 Oct 2008 14:51:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133056#M688512</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-10-01T14:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133057#M688513</link>
      <description>Also, Duncan, how would you suggest, getting this data for ALL lan interfaces?</description>
      <pubDate>Wed, 01 Oct 2008 14:53:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133057#M688513</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-10-01T14:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133058#M688514</link>
      <description>well...if you post the original as an attachment it would help, as the attachment won't mess with spacing like a regular post does.</description>
      <pubDate>Wed, 01 Oct 2008 16:11:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133058#M688514</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-10-01T16:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133059#M688515</link>
      <description>&lt;!--!*#--&gt;For all lan interfaces? Something quick and dirty like this?&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;lanscan -p | while read ppa&lt;BR /&gt;do&lt;BR /&gt;        z[${ppa}]=$(lanadmin -g mibstats ${ppa} 2&amp;gt;&amp;amp;1 | awk '/Inbound Octets/ {print $4}')&lt;BR /&gt;done&lt;BR /&gt;echo "Inbound Bytes per second on all lan interfaces"&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;        sleep 1&lt;BR /&gt;        lanscan -p | while read ppa&lt;BR /&gt;        do&lt;BR /&gt;                x[${ppa}]=$(lanadmin -g mibstats ${ppa} 2&amp;gt;&amp;amp;1 | awk '/Inbound Octets/ {print $4}')&lt;BR /&gt;                (( t=${x[${ppa}]} - ${z[${ppa}]} ))&lt;BR /&gt;                echo "lan${ppa}\t${t}"&lt;BR /&gt;                z[${ppa}]=${x[${ppa}]}&lt;BR /&gt;        done&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;What are you hoping to see from this data? Inbound octets don't tell you much about any particular interface...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Wed, 01 Oct 2008 16:14:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133059#M688515</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2008-10-01T16:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133060#M688516</link>
      <description>Got it old school.</description>
      <pubDate>Wed, 01 Oct 2008 16:21:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133060#M688516</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-10-01T16:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133061#M688517</link>
      <description>Thanks Duncan that works very well, really I am just "messing around" to see what can be done, and have a little fun with it. Just interesting to know how much is coming in is all.</description>
      <pubDate>Wed, 01 Oct 2008 16:24:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133061#M688517</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-10-01T16:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133062#M688518</link>
      <description>Adam,&lt;BR /&gt;&lt;BR /&gt;for what its worth, the script you attached did not generate the syntax errors you reported....so i've got nothin for you</description>
      <pubDate>Wed, 01 Oct 2008 19:21:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133062#M688518</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-10-01T19:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133063#M688519</link>
      <description>&amp;gt;ME: You have a space between the "&amp;lt;&amp;lt;" and "EOF"&lt;BR /&gt;&lt;BR /&gt;I found this space doesn't matter.  But in the other place it matters.</description>
      <pubDate>Wed, 01 Oct 2008 20:22:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133063#M688519</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-10-01T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133064#M688520</link>
      <description>Well Old School, I still get the error. I will figure something out. Thanks Guys! I appreciate your help</description>
      <pubDate>Thu, 02 Oct 2008 14:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-error/m-p/5133064#M688520</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-10-02T14:28:16Z</dc:date>
    </item>
  </channel>
</rss>

