<?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 Help Needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042221#M433045</link>
    <description>If you want to automate a bulk setting of ports, and since as it looks the whole JBoss config is stored in XML, I would suggest you use an XML parser for this task.&lt;BR /&gt;Honestly, I would expect that the JBoss maintainers already have such tools up their sleeve (they really cannot expect an admin clicking through piles of pages in a browser).&lt;BR /&gt;I for one, would help myself by parsing this stuff with one of the many Perl XML parsers (e.g. XML::Simple, relies on libexpat I suppose).&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 25 Apr 2007 06:59:20 GMT</pubDate>
    <dc:creator>Ralph Grothe</dc:creator>
    <dc:date>2007-04-25T06:59:20Z</dc:date>
    <item>
      <title>Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042216#M433040</link>
      <description>&lt;BR /&gt;Requirement : &lt;BR /&gt;&lt;BR /&gt;We are using JBOSS as our java appl server, and need to have multiple instances of jboss servers runing on the box and for that to happen we need to extend the attached default file to have different port configurations  currently the default file  has a total of 3 configs - ports-default, ports-01, ports-02 and we need to extend that till ports ports-15. &lt;BR /&gt;I would like you all to help me in having a script which creates these additional port configurations.( eg. ports for ports-03 can be incremented by +1 in relation to ports-02 )</description>
      <pubDate>Tue, 24 Apr 2007 12:42:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042216#M433040</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-04-24T12:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042217#M433041</link>
      <description>Hunki,&lt;BR /&gt;&lt;BR /&gt;There are an awful lot of ports mentioned in there. Dozens per server definition.&lt;BR /&gt;&lt;BR /&gt;It seems to me some need to be incremented by 100, not 1, like those 'rmiports' under&lt;BR /&gt;name="jboss:service=Naming"&lt;BR /&gt;&lt;BR /&gt;You tell as EXACTLY which ports, to increment by how much and we might try for real.&lt;BR /&gt;&lt;BR /&gt;Seems to me also you do not want to muck with this file directly. This stuff is clearly generated by a tool Use the tool to configure the extra servers?&lt;BR /&gt;&lt;BR /&gt;Finally, to visuale this XML you can of course open it with the exploder under windoze, but you may want to try the "XML Notepad". &lt;BR /&gt;Google for: +"XML notepad" +site:microsoft.com&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Apr 2007 13:18:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042217#M433041</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-04-24T13:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042218#M433042</link>
      <description>Q)You tell as EXACTLY which ports, to increment by how much and we might try for real.&lt;BR /&gt;&lt;BR /&gt;A)Here is a sample ( attached ) of what I want ...ports-02 config is given along with comparable values from ports-01 and I want the same difference in each of my instances ( ports-03 onwards ... till ports-15 )&lt;BR /&gt;&lt;BR /&gt;thanks for taking the challenge .&lt;BR /&gt;&lt;BR /&gt;hunki&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Apr 2007 15:18:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042218#M433042</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-04-24T15:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042219#M433043</link>
      <description>where's the attachment?</description>
      <pubDate>Tue, 24 Apr 2007 15:33:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042219#M433043</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-04-24T15:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042220#M433044</link>
      <description>Oops .. here it is.</description>
      <pubDate>Tue, 24 Apr 2007 15:36:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042220#M433044</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-04-24T15:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042221#M433045</link>
      <description>If you want to automate a bulk setting of ports, and since as it looks the whole JBoss config is stored in XML, I would suggest you use an XML parser for this task.&lt;BR /&gt;Honestly, I would expect that the JBoss maintainers already have such tools up their sleeve (they really cannot expect an admin clicking through piles of pages in a browser).&lt;BR /&gt;I for one, would help myself by parsing this stuff with one of the many Perl XML parsers (e.g. XML::Simple, relies on libexpat I suppose).&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Apr 2007 06:59:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042221#M433045</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-04-25T06:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042222#M433046</link>
      <description>Besides the XML parsing the script gets complicated owing to the presence of filenames that have numbers embedded in their names. For ex. the presence of number 4 in the "jboss-ws4ee.sar" filename. I don't suppose anything needs to be done with it? Meaning it does not need to be incremented?&lt;BR /&gt;&lt;BR /&gt;From the sample input provided it seems like some ports need unit increments while others need 100 increments? And what about strings like "ports-02"? Do these need to be incremented for the next port config which I presume will be 3?&lt;BR /&gt;&lt;BR /&gt;I guess those are some of the issues that needs to be addressed before a viable method of solving this can be concocted.</description>
      <pubDate>Wed, 25 Apr 2007 19:24:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042222#M433046</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-04-25T19:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042223#M433047</link>
      <description>Thanks for replying Sandman !!&lt;BR /&gt;&lt;BR /&gt;Here are the answers to your queries : &lt;BR /&gt;&lt;BR /&gt;Besides the XML parsing the script gets complicated owing to the presence of filenames that have numbers embedded in their names. For ex. the presence of number 4 in the "jboss-ws4ee.sar" filename. I don't suppose anything needs to be done with it? Meaning it does not need to be incremented? &lt;BR /&gt;&lt;BR /&gt;Nope&lt;BR /&gt;&lt;BR /&gt;From the sample input provided it seems like some ports need unit increments while others need 100 increments? And what about strings like "ports-02"? Do these need to be incremented for the next port config which I presume will be 3? &lt;BR /&gt;&lt;BR /&gt;Yes&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Apr 2007 14:38:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042223#M433047</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-04-27T14:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042224#M433048</link>
      <description>So can anybody help please .</description>
      <pubDate>Mon, 30 Apr 2007 15:45:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042224#M433048</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-04-30T15:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042225#M433049</link>
      <description>Many can help but few are willing to. You want too much sugar for a dime. If this were me, I would manually edit a template file and put tags into it (e.g. "|~A1  ~|", "|~A2  ~|") and then write a parser that would substitute values for A1, A2, ...&lt;BR /&gt;It would be rather easy to add arbitrary values to the "base" substition based upon a command-line option. This sounds much like a Perl script to me.&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Apr 2007 15:56:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042225#M433049</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-04-30T15:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042226#M433050</link>
      <description>&lt;!--!*#--&gt;Here's what I have been able to put together albeit in C. Let me know if this will work? Save the file compiling it with an ANSI C compiler and use the shell's I/O re-direction mechanism to supply the input file for example:&lt;BR /&gt;&lt;BR /&gt;# cc parsexml.c -o parsexml&lt;BR /&gt;# cat infile | parsexml&lt;BR /&gt;or&lt;BR /&gt;# parsexml &lt;INFILE&gt;&lt;/INFILE&gt;&lt;BR /&gt;========================== parsexml.c ==========================&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;CTYPE.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;    int c, buf;&lt;BR /&gt;&lt;BR /&gt;    while ((c = getchar()) != EOF) {&lt;BR /&gt;        if (isdigit(c))&lt;BR /&gt;            buf = c - '0' + 10 * buf;&lt;BR /&gt;        else {&lt;BR /&gt;            if (buf)&lt;BR /&gt;                printf(buf&amp;gt;100?"%d":"0%d",buf&amp;gt;100?buf+100:buf+1);&lt;BR /&gt;            putchar(c);&lt;BR /&gt;            buf = 0;&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;}&lt;/CTYPE.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Mon, 30 Apr 2007 16:27:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042226#M433050</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-04-30T16:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042227#M433051</link>
      <description>Thanks for replying Sandman , but no luck , there is no change in the xml file after doing it.</description>
      <pubDate>Tue, 01 May 2007 11:17:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042227#M433051</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-05-01T11:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042228#M433052</link>
      <description>The XML file won't change in place. Instead save the stdout stream to an output file. The new file will have port numbers that are either 100 or 1 more than their counterparts in the input file viz.,&lt;BR /&gt;&lt;BR /&gt;# cat infile | parsexml &amp;gt;outfile&lt;BR /&gt;or&lt;BR /&gt;# parsexml &lt;INFILE&gt;outfile&lt;BR /&gt;&lt;BR /&gt;~cheers&lt;/INFILE&gt;</description>
      <pubDate>Tue, 01 May 2007 16:36:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042228#M433052</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-05-01T16:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042229#M433053</link>
      <description>thanks Sandman , Cud please explain in detail of what the c code is doing. That would be very helpful. Thanks for a very sincere effort.&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;hunki</description>
      <pubDate>Wed, 02 May 2007 09:10:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042229#M433053</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-05-02T09:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042230#M433054</link>
      <description>Another thing is that generating the port config file is a stepwise procedure and the output file becomes the input file for the next iteration. For example the input file you provided is the config file for port 02. To generate a config file for port 03 do as follows:&lt;BR /&gt;&lt;BR /&gt;# parsexml &lt;PORT-02-FILE&gt;port-03-file&lt;BR /&gt;&lt;BR /&gt;The above command creates the config file for port 03. This file will become the input file for generating the config file for port 4...so on and so forth until all port configurations you need are exhausted i.e.&lt;BR /&gt;&lt;BR /&gt;# parsexml &lt;PORT-03-FILE&gt;port-04-file&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;# parsexml &lt;PORT-14-FILE&gt;port-15-file&lt;BR /&gt;&lt;BR /&gt;~hope it helps&lt;/PORT-14-FILE&gt;&lt;/PORT-03-FILE&gt;&lt;/PORT-02-FILE&gt;</description>
      <pubDate>Wed, 02 May 2007 16:25:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042230#M433054</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-05-02T16:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042231#M433055</link>
      <description>&amp;gt;Cud please explain in detail of what the c code is doing.&lt;BR /&gt;&lt;BR /&gt;The program reads standard input (stdin), which can be redirected using the mechanisms provided by the shell, a character at a time scanning for digits. If the character read is not a digit then it is sent to standard output. On the other hand if the character is a digit then a local variable named "buf" collects them until a non-digit is encountered. At this point the integer variable "buf" is printed to standard output along with the non-digit character just read.&lt;BR /&gt;&lt;BR /&gt;There are atleast a couple of ambiguities that are hard to resolve; one is the presence of digits within a filename which certainly is not up for incrementing and another is which numeric string needs to be incremented by 1 and which by 100. Hope it makes sense and hope it helps.&lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Sun, 06 May 2007 23:48:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042231#M433055</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-05-06T23:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help Needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042232#M433056</link>
      <description>Thank You Very Much Sandman !</description>
      <pubDate>Mon, 07 May 2007 11:29:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-needed/m-p/5042232#M433056</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2007-05-07T11:29:10Z</dc:date>
    </item>
  </channel>
</rss>

