<?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: Board Graphics Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844370#M393643</link>
    <description>I hope nobody minds me posting so much, but I thought of a better way to do the menu thing....&lt;BR /&gt;&lt;BR /&gt;# variables&lt;BR /&gt;MENUCHOICE=0&lt;BR /&gt;EXITVALUE=1&lt;BR /&gt;&lt;BR /&gt;# functions&lt;BR /&gt;dspmenu1 ()&lt;BR /&gt;{&lt;BR /&gt;clear&lt;BR /&gt;echo ""&lt;BR /&gt;echo "  Please choose and option below, by typing in the number:"&lt;BR /&gt;echo "    1)  Display Board Graphic 1"&lt;BR /&gt;echo "    2)  Display Board Graphic 2"&lt;BR /&gt;echo "    3)  Exit"&lt;BR /&gt;read MENUCHOICE&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;readchoice ()&lt;BR /&gt;{&lt;BR /&gt;case "$MENUCHOICE" in&lt;BR /&gt;    1)  clear&lt;BR /&gt;        echo "This is Board Graphic #1"&lt;BR /&gt;        EXITVALUE=0;;&lt;BR /&gt;    2)  clear&lt;BR /&gt;        echo "This is Board Graphic #2"&lt;BR /&gt;        EXITVALUE=0;;&lt;BR /&gt;    3)  echo "exiting..."&lt;BR /&gt;        EXITVALUE=0;;&lt;BR /&gt;    *)  echo "Please choose a number from the list!"&lt;BR /&gt;        sleep 1&lt;BR /&gt;        EXITVALUE=1;;&lt;BR /&gt;esac&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# Execution&lt;BR /&gt;while [ $EXITVALUE != 0 ]&lt;BR /&gt;do&lt;BR /&gt;    dspmenu1&lt;BR /&gt;    readchoice&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;echo "Complete"&lt;BR /&gt;</description>
    <pubDate>Mon, 02 Jul 2001 14:11:56 GMT</pubDate>
    <dc:creator>Jared Westgate_1</dc:creator>
    <dc:date>2001-07-02T14:11:56Z</dc:date>
    <item>
      <title>Board Graphics Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844365#M393638</link>
      <description>I need information on scripts. I would like a script that would allow a user to select from a menu and then run board graphics. The menu would be something like this:&lt;BR /&gt;&lt;BR /&gt; 1. 724781 Board Graphics&lt;BR /&gt; 2. 724785 Board Graphics&lt;BR /&gt; 3. 724791 Board Graphics&lt;BR /&gt;&lt;BR /&gt;The command 'board graphics' is normally executed in the BT-BASIC window. In a BT-BASIC window the command is MSI '/hp3070/boards/724781/board graphics' and that would display the board graphics for that board. Can such a script be made?  Do scripts have a file extension like the MSDOS Batch files? How do you start a script? Thanks.&lt;BR /&gt;&lt;BR /&gt;hp3070 with B180L, hpux 10.2x.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jun 2001 14:58:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844365#M393638</guid>
      <dc:creator>Jeffrey W. Stewart</dc:creator>
      <dc:date>2001-06-26T14:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Board Graphics Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844366#M393639</link>
      <description>Should this have been asked in a different forum? I can't even get a simple script to work.&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;if ["$1"]&lt;BR /&gt;then&lt;BR /&gt;echo "Found an argument to this script"&lt;BR /&gt;if [ $1="fred"]&lt;BR /&gt;then&lt;BR /&gt;echo "the argument was fred"&lt;BR /&gt;else&lt;BR /&gt;echo "the argument was not fred"&lt;BR /&gt;fi&lt;BR /&gt;else&lt;BR /&gt;echo "This script needs one argument&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Jun 2001 17:02:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844366#M393639</guid>
      <dc:creator>Jeffrey W. Stewart</dc:creator>
      <dc:date>2001-06-29T17:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Board Graphics Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844367#M393640</link>
      <description>Hello Jeffrey,&lt;BR /&gt;&lt;BR /&gt;I don't know what a board graphic is, but I think I can help you with your script. I apologize if I'm being too basic, but here is my understanding (although I am still a beginner)...  First, unix doesn't use filename extensions to specify what type of file it is (that's one of the things that makes it "virus-proof").  In order to make a file executable, it needs to have the correct access permissions.  When you do an "ls -l", the first column will show the access permissions.  For example:&lt;BR /&gt;&lt;BR /&gt;-rwxr-xr-x  1  jwestgat mis  testfile&lt;BR /&gt;        &lt;BR /&gt;the first "-" in the example is basically the type of object it is (d for directory, l for link, - for a normal file).  The next three are the permissions for the owner (r=read, w=write, x=execute).  Then next three are for the group, the last three are for everybody else.  Basically, you need to make sure you have an x permission if you want to execute a file.  In my example, all users could execute the "testfile" program.&lt;BR /&gt;&lt;BR /&gt;Second, if you want to actually run the script, you use the "." command.  Type in "./testfile" to run the command in my example.&lt;BR /&gt;&lt;BR /&gt;Finally, I think there may be a few small synax errors in your program, give this a try:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh &lt;BR /&gt;if [ "$1" ] &lt;BR /&gt;then &lt;BR /&gt;echo "Found an argument to this script" &lt;BR /&gt;if [ $1="fred" ] &lt;BR /&gt;then &lt;BR /&gt;echo "the argument was fred" &lt;BR /&gt;else &lt;BR /&gt;echo "the argument was not fred" &lt;BR /&gt;fi &lt;BR /&gt;else &lt;BR /&gt;echo "This script needs one argument" &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;I hope this has helped, please let me know if I missed anything.&lt;BR /&gt;&lt;BR /&gt;Jared</description>
      <pubDate>Fri, 29 Jun 2001 19:20:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844367#M393640</guid>
      <dc:creator>Jared Westgate_1</dc:creator>
      <dc:date>2001-06-29T19:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Board Graphics Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844368#M393641</link>
      <description>Jared,&lt;BR /&gt;Your reply helped me with starting to write scripts. I realize now the [ is the same as Test. I would like to present a menu and then have board graphics displayed for that choice. I know the command to display board graphics, so I just need to get the menu and menu selection working. I believe I need to use a read command.</description>
      <pubDate>Mon, 02 Jul 2001 12:37:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844368#M393641</guid>
      <dc:creator>Jeffrey W. Stewart</dc:creator>
      <dc:date>2001-07-02T12:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Board Graphics Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844369#M393642</link>
      <description>Hey Jeffrey,&lt;BR /&gt;&lt;BR /&gt;I use the read command to take input from the keyboard.  There are probably others, but this is the only one I know.  I put together a little script that might help you.  I don't know if this will help you much, I'm certainly not a scripting expert.  Here it is:&lt;BR /&gt;&lt;BR /&gt;# variables&lt;BR /&gt;MENUCHOICE=0&lt;BR /&gt;&lt;BR /&gt;# execution&lt;BR /&gt;clear&lt;BR /&gt;echo " "&lt;BR /&gt;echo "  Please choose and option below, by typing in the number:"&lt;BR /&gt;echo "    1)  Display Board Graphic 1"&lt;BR /&gt;echo "    2)  Display Board Graphic 2"&lt;BR /&gt;echo "    3)  Exit"&lt;BR /&gt;&lt;BR /&gt;read MENUCHOICE&lt;BR /&gt;&lt;BR /&gt;case "$MENUCHOICE" in&lt;BR /&gt;    1)  clear&lt;BR /&gt;        echo "This is Board Graphic #1";;&lt;BR /&gt;    2)  clear&lt;BR /&gt;        echo "This is Board Graphic #2";;&lt;BR /&gt;    3)  echo "exiting..."&lt;BR /&gt;        exit 0;;&lt;BR /&gt;    *)  echo "Please choose a number!";;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;echo "Complete"&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jul 2001 13:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844369#M393642</guid>
      <dc:creator>Jared Westgate_1</dc:creator>
      <dc:date>2001-07-02T13:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Board Graphics Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844370#M393643</link>
      <description>I hope nobody minds me posting so much, but I thought of a better way to do the menu thing....&lt;BR /&gt;&lt;BR /&gt;# variables&lt;BR /&gt;MENUCHOICE=0&lt;BR /&gt;EXITVALUE=1&lt;BR /&gt;&lt;BR /&gt;# functions&lt;BR /&gt;dspmenu1 ()&lt;BR /&gt;{&lt;BR /&gt;clear&lt;BR /&gt;echo ""&lt;BR /&gt;echo "  Please choose and option below, by typing in the number:"&lt;BR /&gt;echo "    1)  Display Board Graphic 1"&lt;BR /&gt;echo "    2)  Display Board Graphic 2"&lt;BR /&gt;echo "    3)  Exit"&lt;BR /&gt;read MENUCHOICE&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;readchoice ()&lt;BR /&gt;{&lt;BR /&gt;case "$MENUCHOICE" in&lt;BR /&gt;    1)  clear&lt;BR /&gt;        echo "This is Board Graphic #1"&lt;BR /&gt;        EXITVALUE=0;;&lt;BR /&gt;    2)  clear&lt;BR /&gt;        echo "This is Board Graphic #2"&lt;BR /&gt;        EXITVALUE=0;;&lt;BR /&gt;    3)  echo "exiting..."&lt;BR /&gt;        EXITVALUE=0;;&lt;BR /&gt;    *)  echo "Please choose a number from the list!"&lt;BR /&gt;        sleep 1&lt;BR /&gt;        EXITVALUE=1;;&lt;BR /&gt;esac&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# Execution&lt;BR /&gt;while [ $EXITVALUE != 0 ]&lt;BR /&gt;do&lt;BR /&gt;    dspmenu1&lt;BR /&gt;    readchoice&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;echo "Complete"&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jul 2001 14:11:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844370#M393643</guid>
      <dc:creator>Jared Westgate_1</dc:creator>
      <dc:date>2001-07-02T14:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Board Graphics Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844371#M393644</link>
      <description>Solution is in the Thread</description>
      <pubDate>Wed, 05 Jan 2005 10:12:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/board-graphics-script/m-p/4844371#M393644</guid>
      <dc:creator>Jeffrey W. Stewart</dc:creator>
      <dc:date>2005-01-05T10:12:42Z</dc:date>
    </item>
  </channel>
</rss>

