- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Board Graphics Script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2001 07:58 AM
тАО06-26-2001 07:58 AM
1. 724781 Board Graphics
2. 724785 Board Graphics
3. 724791 Board Graphics
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.
hp3070 with B180L, hpux 10.2x.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2001 10:02 AM
тАО06-29-2001 10:02 AM
Re: Board Graphics Script
#!/bin/sh
if ["$1"]
then
echo "Found an argument to this script"
if [ $1="fred"]
then
echo "the argument was fred"
else
echo "the argument was not fred"
fi
else
echo "This script needs one argument
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2001 12:20 PM
тАО06-29-2001 12:20 PM
Re: Board Graphics Script
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:
-rwxr-xr-x 1 jwestgat mis testfile
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.
Second, if you want to actually run the script, you use the "." command. Type in "./testfile" to run the command in my example.
Finally, I think there may be a few small synax errors in your program, give this a try:
#!/bin/sh
if [ "$1" ]
then
echo "Found an argument to this script"
if [ $1="fred" ]
then
echo "the argument was fred"
else
echo "the argument was not fred"
fi
else
echo "This script needs one argument"
fi
I hope this has helped, please let me know if I missed anything.
Jared
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2001 05:37 AM
тАО07-02-2001 05:37 AM
Re: Board Graphics Script
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2001 06:41 AM
тАО07-02-2001 06:41 AM
Re: Board Graphics Script
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:
# variables
MENUCHOICE=0
# execution
clear
echo " "
echo " Please choose and option below, by typing in the number:"
echo " 1) Display Board Graphic 1"
echo " 2) Display Board Graphic 2"
echo " 3) Exit"
read MENUCHOICE
case "$MENUCHOICE" in
1) clear
echo "This is Board Graphic #1";;
2) clear
echo "This is Board Graphic #2";;
3) echo "exiting..."
exit 0;;
*) echo "Please choose a number!";;
esac
echo "Complete"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2001 07:11 AM
тАО07-02-2001 07:11 AM
Solution# variables
MENUCHOICE=0
EXITVALUE=1
# functions
dspmenu1 ()
{
clear
echo ""
echo " Please choose and option below, by typing in the number:"
echo " 1) Display Board Graphic 1"
echo " 2) Display Board Graphic 2"
echo " 3) Exit"
read MENUCHOICE
}
readchoice ()
{
case "$MENUCHOICE" in
1) clear
echo "This is Board Graphic #1"
EXITVALUE=0;;
2) clear
echo "This is Board Graphic #2"
EXITVALUE=0;;
3) echo "exiting..."
EXITVALUE=0;;
*) echo "Please choose a number from the list!"
sleep 1
EXITVALUE=1;;
esac
}
# Execution
while [ $EXITVALUE != 0 ]
do
dspmenu1
readchoice
done
echo "Complete"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2005 02:12 AM
тАО01-05-2005 02:12 AM