Within a ksh script on HP-UX I trying to calculate a percentage of a number (number/100 x percentage) using the below method and expr.
TARPERC=`expr 16 / 100 \* 5`
TARSUM=`expr 16 + $TARPERC`
ZIPSUM=`expr $TARSUM \* 2`
If the input is 16
outputs are:
TARPERC: 0
TARSUM: 16
ZIPSUM: 32... (6 Replies)
Hi all,
Can any one help me.......
I just want to run one shell script whenever i am rebooting the server. Is there any easy way to do that????
Thanks,
selva (7 Replies)
Hello,
I would like to create a report every month about the working hours of some servers.
I need to get results such as how long are the servers up every month, which hours/days are up.
Do you know any tool which will help me?
Thanks in advance (2 Replies)
I have a script that runs fine under my home directory. No syntax errors, runs and returns as expected.
When I migrate the script to the UAT directories on the same server for User testing, I get a syntax error.
I've checked to make sure the .profile I'm using is the same in the UAT... (1 Reply)
how to find out total number of users logged in a server from uptime . i mean to say i need the total output of unix command . who gives the out put at a particular time . I need at all time from which machine who has connected , (3 Replies)
Hi!
I want to extract the uptime from the output of the uptime command.
The output:
11:53 up 3:02, 2 users, load averages: 0,32 0,34 0,43
I just need the "3:02" part. How can I do this?
Dirk (6 Replies)
What is the uptime command output when the server is running more than one year?
My doubt is whether it show in number of days format or number years and number of days format?
For example, Assume the server is running 400 days 3 hrs 3 min 3 secs. The output like 400 days 3:3 min or 1 year 5... (3 Replies)
I am unable to get this KSH script to work. Can someone help. I've been told this should work with KSH93. Which I think I have on Solaris 10.
If I do a grep -i version /usr/dt/bin/dtksh I get
@(#)Version M-12/28/93d
@(#)Version 12/28/93
@(#)Version M-12/28/93
This is correct for... (5 Replies)
Hi
One of our server is showing the uptime 0hr 5mints
there is no log in /var/log/messages
there is no log in command "last"
kernel version is 2.4.9 (RH2.1 AS)
What could be the reason for this. is this issue is related to uptime counter reached max
how to verify this.
Best Regards
KVK (4 Replies)
ttk::scale(n) Tk Themed Widget ttk::scale(n)
__________________________________________________________________________________________________________________________________________________NAME
ttk::scale - Create and manipulate a scale widget
SYNOPSIS
ttk::scale pathName ?options...?
_________________________________________________________________DESCRIPTION
A ttk::scale widget is typically used to control the numeric value of a linked variable that varies uniformly over some range. A scale dis-
plays a slider that can be moved along over a trough, with the relative position of the slider over the trough indicating the value of the
variable.
STANDARD OPTIONS -class-cursor-style
-takefocus
See the ttk_widget manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
[-command command] Specifies the prefix of a Tcl command to invoke whenever the scale's value is changed via a widget command. The actual
command consists of this option followed by a space and a real number indicating the new value of the scale. [-from from] A real value
corresponding to the left or top end of the scale. [-length length] Specifies the desired long dimension of the scale in screen units
(i.e. any of the forms acceptable to Tk_GetPixels). For vertical scales this is the scale's height; for horizontal scales it is the scale's
width. [-orient orient] Specifies which orientation whether the widget should be laid out horizontally or vertically. Must be either hori-
zontal or vertical or an abbreviation of one of these. [-to to] Specifies a real value corresponding to the right or bottom end of the
scale. This value may be either less than or greater than the from option. [-value value] Specifies the current floating-point value of
the variable. [-variable variable] Specifies the name of a global variable to link to the scale. Whenever the value of the variable
changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to
reflect the scale's new value.
WIDGET COMMAND
pathName cget option
Returns the current value of the specified option; see ttk::widget(n).
pathName configure ?option? ?value option value ...?
Modify or query widget options; see ttk::widget(n).
pathName get ?x y?
Get the current value of the -value option, or the value corresponding to the coordinates x,y if they are specified. X and y are
pixel coordinates relative to the scale widget origin.
pathName identify x y
Returns the name of the element at position x, y. See ttk::widget(n).
pathName instate statespec ?script?
Test the widget state; see ttk::widget(n).
pathName set value
Set the value of the widget (i.e. the -value option) to value. The value will be clipped to the range given by the -from and -to
options. Note that setting the linked variable (i.e. the variable named in the -variable option) does not cause such clipping.
pathName state ?stateSpec?
Modify or query the widget state; see ttk::widget(n).
INTERNAL COMMANDS
pathName coords ?value?
Get the coordinates corresponding to value, or the coordinates corresponding to the current value of the -value option if value is
omitted.
SEE ALSO
ttk::widget(n), scale(n)
KEYWORDS
scale, slider, trough, widget
Tk 8.5 ttk::scale(n)