I get the following output:
The number in variable $DD is clearly corrupted during the arithmetic operation. This is because of binary overflow.
The largest positive number you can hold in a shell integer variable is:
+2147483647 .
-which is exactly one less than (1024 x 1024 x 1024 x 2).
To work in Shell with larger numbers you must use and external program such as "bc" and store intermediate numbers in text variables.
Hi,
I have an expression using grep and nawk that captures the ID number of a given Unix process. It gets printed to screen but I don't know how to declare a variable to this returned value!
For example,
ps -ef|grep $project | grep -v grep | nawk '{print $2}'
This returns my number. How... (2 Replies)
Hi,
I am passing a variable to a unix function.
However when I try to assign the value to another variable like
typeset -i I_CACHE_VAL=$2
Is this because of String to Integer conversion?
I get an error.
Please help me with thsi.
Thanks (2 Replies)
Hello,
I am in following situation.-
COUNT=`ls -l | wc -l`
echo $COUNT
---> 26
NO_OF_FILES=$COUNT-1
echo $NO_OF_FILES
---> 26-1
Here, I want the output to be 25. How could I do this. It seems simple, but I am not getting it. Please help me. (2 Replies)
Hi,
I have multiple functions that can be called by any shell script. These functions have inbuilt echo statements to logs their activity into a log file. When I run multiple shell scripts that call these functions, they all log into the same log file and I am not able to differentiate which... (2 Replies)
I read 3 variables from from Inputfile.txt the third one "startnumber" is a number when i compare it with 9 ($startnumber -le 9) it give's me a "unary operator expected", i know that -le is for number comparison. What i need is to convert $startnumber to integer (i have try to do it with expr but... (8 Replies)
hello,
i am writing a script that takes the UID from the PASSWD and then i want
to increse the Number by one. for the Next user.
i cannot get this to work that a variable is as interger
example:
set i = 0
set $i = $+1
it's in tcsh if it's mather (10 Replies)
Hi Guys,
i guess there is a several ways to grub the strings from date and time
like THISMONTH='/bin/date +%m'
but the hard part is to add or sub that string to a variable
i tried to use let command
TWOMONTHSAGO=$THISMONTH
declare -i TWOMONTHSAGO
let TWOMONTHSAGO-=2
but there... (1 Reply)
In log directory file contain log files and files contain some unique job name which is dynamically created (example=55555 ),if job get 55555 then send alert message, but after next run if it find ---55555 then no need send alert message
While checking the first job name you are capturing the Job... (3 Replies)
Discussion started by: Kalia
3 Replies
LEARN ABOUT REDHAT
tkvars
tkvars(n) Tk Built-In Commands tkvars(n)
__________________________________________________________________________________________________________________________________________________NAME
tkvars - Variables used or set by Tk
_________________________________________________________________DESCRIPTION
The following Tcl variables are either set or used by Tk at various times in its execution:
tk_library This variable holds the file name for a directory containing a library of Tcl scripts related to Tk. These scripts include
an initialization file that is normally processed whenever a Tk application starts up, plus other files containing proce-
dures that implement default behaviors for widgets. The initial value of tcl_library is set when Tk is added to an inter-
preter; this is done by searching several different directories until one is found that contains an appropriate Tk startup
script. If the TK_LIBRARY environment variable exists, then the directory it names is checked first. If TK_LIBRARY isn't
set or doesn't refer to an appropriate directory, then Tk checks several other directories based on a compiled-in default
location, the location of the Tcl library directory, the location of the binary containing the application, and the current
working directory. The variable can be modified by an application to switch to a different library.
tk_patchLevel Contains a decimal integer giving the current patch level for Tk. The patch level is incremented for each new release or
patch, and it uniquely identifies an official version of Tk.
tkPriv This variable is an array containing several pieces of information that are private to Tk. The elements of tkPriv are used
by Tk library procedures and default bindings. They should not be accessed by any code outside Tk.
tk_strictMotif This variable is set to zero by default. If an application sets it to one, then Tk attempts to adhere as closely as possi-
ble to Motif look-and-feel standards. For example, active elements such as buttons and scrollbar sliders will not change
color when the pointer passes over them.
tk_version Tk sets this variable in the interpreter for each application. The variable holds the current version number of the Tk
library in the form major.minor. Major and minor are integers. The major version number increases in any Tk release that
includes changes that are not backward compatible (i.e. whenever existing Tk applications and scripts may have to change to
work with the new release). The minor version number increases with each new release of Tk, except that it resets to zero
whenever the major version number changes.
KEYWORDS
variables, version
Tk 4.1 tkvars(n)