ITEMCNT = 3
ITEMCNTSTAR = 3
ALLITEMS = First Menu Line Second Menu Line Third Menu Line
ALLITEMSSTAR = First Menu Line Second Menu Line Third Menu Line
lipossrp01ga:/home/lc25487/ksh $
==========
What (if anything} is the difference between the usage of @ or * ?
I'm attempting to populate an array in ksh using the following command:
set -A $(SELECT_INVOICE | sed '/^$/d')
SELECT_INVOICE is a function that executes the SQL query.
Problem: Some of the invoice numbers have alpha characters with spaces(example: OVEN MICRO). The Korn shell is treating... (1 Reply)
I read it is possible to provide values for an array with the -A option to the read statement; however, I have not been able to get this to work. When I execute a script with the -A option to the read statement, the shell complains that it is an illegal option. If this works, can someone provide... (5 Replies)
I have a script that contains
#!/usr/bin/ksh
set -A X 'hallo' 'world'
echo ${X}
echo ${X}
when I execute it I get an errror message
sh ./test.ksh
./test.ksh: -A: bad option(s)
but if I do this at the command prompt I am able to create it
set -A myarray '1' '2' '3'
echo ${myarray}... (4 Replies)
I am writing a script to keep check on free disk space, and I would like to find a way to parse $LINE (see code below) into a numeric value (for free disk space percentage) and a string value (for mount point). If possible, I would like to avoid sed or any additional use of awk since I am not very... (7 Replies)
Hello All,
I was just wondering if there is any direct way to access PL/SQL OUT variables from Korn Shell Script.
I could already figure out how to return a single value back from PL/SQL to Shell Script (using bind variable).
But, what if we want to return multiple values?
One option I... (4 Replies)
I have a korn shell script that reads a file with just one column in the file. If the file has more than 5 entries it is split using split -5. This means that is we have 15 entries I will end up with 3 files with 5 entries/lines in each and if I have 23 entries I will end up with 5 files with the... (2 Replies)
Hi,
I am trying to define number of array based on constant derived during execution phase of a script. Here is what i am trying..
#First Part, Get LUN input from User
lun_count=4
count=0
set -A my_lun
while :
do
while ]; do
read L?"Enter Lun "$count" Number:"
... (2 Replies)
Hi I'm not using Korn93 but want to use floating point variable.
Is there any solution to do that ?
thx for help.
---------- Post updated at 02:28 PM ---------- Previous update was at 12:38 PM ----------
I have the following peace of code:
for n in `cat log.January.1.array`
do
... (3 Replies)
I have a text file with several key words that I am trying to isolate. I have grepped for the unknowns in the text file, but each unknown has a corresponding location. I have created an array that holds all the unknowns and another array that holds all of the locations and compares them based on... (12 Replies)
Discussion started by: ther2000
12 Replies
LEARN ABOUT CENTOS
tk::menu::item
Menu::Item(3) User Contributed Perl Documentation Menu::Item(3)NAME
Tk::Menu::Item - Base class for Menu items
SYNOPSIS
require Tk::Menu::Item;
my $but = $menu->Button(...);
$but->configure(...);
my $what = $but->cget();
package Whatever;
require Tk::Menu::Item;
@ISA = qw(Tk::Menu::Item);
sub PreInit
{
my ($class,$menu,$info) = @_;
$info->{'-xxxxx'} = ...
my $y = delete $info->{'-yyyy'};
}
DESCRIPTION
Tk::Menu::Item is the base class from which Tk::Menu::Button, Tk::Menu::Cascade, Tk::Menu::Radiobutton and Tk::Menu::Checkbutton are
derived. There is also a Tk::Menu::Separator.
Constructors are declared so that $menu->Button(...) etc. do what you would expect.
The "-label" option is pre-processed allowing ~ to be prefixed to the character to derive a "-underline" value. Thus
$menu->Button(-label => 'Goto ~Home',...)
is equivalent to
$menu->Button(-label => 'Goto Home', -underline => 6, ...)
The "Cascade" menu item creates a sub-menu and accepts these options:
-menuitems
A list of items for the sub-menu. Within this list (which is also accepted by Menu and Menubutton) the first two elements of each item
should be the "constructor" name and the label:
-menuitems => [
[Button => '~Quit', -command => [destroy => $mw]],
[Checkbutton => '~Oil', -variable => $oil],
]
-postcommand
A callback to be invoked before posting the menu.
-tearoff
Specifies whether sub-menu can be torn-off or not.
-menuvar
Scalar reference that will be set to the newly-created sub-menu.
The returned object is currently a blessed reference to an array of two items: the containing Menu and the 'label'. Methods "configure"
and "cget" are mapped onto underlying "entryconfigure" and "entrycget".
The main purpose of the OO interface is to allow derived item classes to be defined which pre-set the options used to create a more basic
item.
BUGS
This OO interface is very new. Using the label as the "key" is a problem for separaror items which don't have one. The alternative would be
to use an index into the menu but that is a problem if items are deleted (or inserted other than at the end).
There should probably be a PostInit entry point too, or a more widget like defered 'configure'.
perl v5.16.3 2014-06-10 Menu::Item(3)