<?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: Basic script issue in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113717#M446502</link>
    <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;I already provided what you need:&lt;BR /&gt;&lt;BR /&gt;# cat vsnfile&lt;BR /&gt;000001&lt;BR /&gt;000002&lt;BR /&gt;000003&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read VSN&lt;BR /&gt;do&lt;BR /&gt;    bpmedia -movedb -ev ${VSN} -oldsever&lt;BR /&gt;done &amp;lt; vsnfile&lt;BR /&gt;&lt;BR /&gt;...it doesn't get any harder.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 13 Jun 2008 11:37:44 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-06-13T11:37:44Z</dc:date>
    <item>
      <title>Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113710#M446495</link>
      <description>I am trying to write a simple script that will read tape media located in a file and run a command against each tape in the file. Of course I am learning as I go along, but can any help me? FYI: I am on an 11.11 platform.</description>
      <pubDate>Thu, 12 Jun 2008 16:12:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113710#M446495</guid>
      <dc:creator>frederick hannah</dc:creator>
      <dc:date>2008-06-12T16:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113711#M446496</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;For the sake of the example, assume that the input file has whitespace-delimited fields of a tapename and a tape number, like:&lt;BR /&gt;&lt;BR /&gt;# cat ./inputlist&lt;BR /&gt;full_080603 789&lt;BR /&gt;increm_080604 900&lt;BR /&gt;increm_080605 877&lt;BR /&gt;&lt;BR /&gt;...then, something like:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read NAME SERIAL X&lt;BR /&gt;do&lt;BR /&gt;    echo "${NAME} available"&lt;BR /&gt;done &amp;lt; inputlist&lt;BR /&gt;&lt;BR /&gt;...will work...&lt;BR /&gt;&lt;BR /&gt;The 'X' field will gobble up any fields that follow the 'SERIAL' field if is should exist.  If the extent of what you want is just the 'NAME' then just write:&lt;BR /&gt;&lt;BR /&gt;while read NAME X&lt;BR /&gt;&lt;BR /&gt;...for the same reason.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 12 Jun 2008 16:21:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113711#M446496</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-12T16:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113712#M446497</link>
      <description>I'm guessing from your description that a simple for loop might suffice.  Something like:&lt;BR /&gt;&lt;BR /&gt;for MEDIA in `cat medialist`&lt;BR /&gt;do&lt;BR /&gt;tar -xvf $MEDIA&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;I used tar since you didn't specify.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 12 Jun 2008 16:22:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113712#M446497</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-06-12T16:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113713#M446498</link>
      <description>thanks for quick replies, but neither answer seems to work. I have a file consisting of vsn that need to be read into the following program (example):&lt;BR /&gt;&lt;BR /&gt;xxxxx &lt;MEDIA -id=""&gt; xxxxx&lt;BR /&gt;&lt;BR /&gt;The program can read only tape at a time. I know the answer is simple, but it escapes me.&lt;BR /&gt;&lt;/MEDIA&gt;</description>
      <pubDate>Thu, 12 Jun 2008 16:37:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113713#M446498</guid>
      <dc:creator>frederick hannah</dc:creator>
      <dc:date>2008-06-12T16:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113714#M446499</link>
      <description>It's possible that you know what you're&lt;BR /&gt;talking about, but it's far from clear to me.&lt;BR /&gt;I freely admit that my psychic powers are&lt;BR /&gt;weak.&lt;BR /&gt;&lt;BR /&gt;Perhaps you could show what's in your "file&lt;BR /&gt;consisting of vsn", and what the resulting&lt;BR /&gt;command(s) you'd like generate would look&lt;BR /&gt;like.  Given some actual information, you can&lt;BR /&gt;almost certainly find someone who can write&lt;BR /&gt;a script to do what you want.  Given no&lt;BR /&gt;useful information, all you'll get will be a&lt;BR /&gt;lot of guesswork, which may be of limited&lt;BR /&gt;value.</description>
      <pubDate>Fri, 13 Jun 2008 02:23:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113714#M446499</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-13T02:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113715#M446500</link>
      <description>&lt;!--!*#--&gt;&amp;gt;I have a file consisting of vsn:&lt;BR /&gt;xxxxx &lt;MEDIA -id=""&gt; xxxxx&lt;BR /&gt;&lt;BR /&gt;You need to make this simpler.  Is it:&lt;BR /&gt;XXX VVVV YYY&lt;BR /&gt;&lt;BR /&gt;Where you want to just extract the VVVV field?&lt;BR /&gt;If so, you change JRF's script to:&lt;BR /&gt;while read X VSN X; do&lt;BR /&gt;   echo "${VSN} available"&lt;BR /&gt;done &amp;lt; inputlist&lt;/MEDIA&gt;</description>
      <pubDate>Fri, 13 Jun 2008 03:01:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113715#M446500</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-13T03:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113716#M446501</link>
      <description>In a nutshell, the file is structured as follows:&lt;BR /&gt;&lt;BR /&gt;000001&lt;BR /&gt;000002&lt;BR /&gt;000003&lt;BR /&gt;&lt;BR /&gt;A tower list of vsn's only. I am looking for a script that will read those vsn(s) into the following command:&lt;BR /&gt;&lt;BR /&gt;bpmedia -movedb -ev &lt;MEDIA_ID&gt; -oldsever&lt;BR /&gt;&lt;BR /&gt;&lt;/MEDIA_ID&gt;</description>
      <pubDate>Fri, 13 Jun 2008 11:31:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113716#M446501</guid>
      <dc:creator>frederick hannah</dc:creator>
      <dc:date>2008-06-13T11:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113717#M446502</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;I already provided what you need:&lt;BR /&gt;&lt;BR /&gt;# cat vsnfile&lt;BR /&gt;000001&lt;BR /&gt;000002&lt;BR /&gt;000003&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read VSN&lt;BR /&gt;do&lt;BR /&gt;    bpmedia -movedb -ev ${VSN} -oldsever&lt;BR /&gt;done &amp;lt; vsnfile&lt;BR /&gt;&lt;BR /&gt;...it doesn't get any harder.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 13 Jun 2008 11:37:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113717#M446502</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-13T11:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113718#M446503</link>
      <description>thanks for the assist</description>
      <pubDate>Fri, 13 Jun 2008 11:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113718#M446503</guid>
      <dc:creator>frederick hannah</dc:creator>
      <dc:date>2008-06-13T11:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Basic script issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113719#M446504</link>
      <description>It works. I appreciate the support</description>
      <pubDate>Fri, 13 Jun 2008 11:41:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/basic-script-issue/m-p/5113719#M446504</guid>
      <dc:creator>frederick hannah</dc:creator>
      <dc:date>2008-06-13T11:41:54Z</dc:date>
    </item>
  </channel>
</rss>

