incr(n) Tcl Built-In Commands incr(n)
incr - Increment the value of a variable
incr varName ?increment?
Increments the value stored in the variable whose name is varName. The value of the variable must be an integer. If increment is supplied
then its value (which must be an integer) is added to the value of variable varName; otherwise 1 is added to varName. The new value is
stored as a decimal string in variable varName and also returned as result.
Starting with the Tcl 8.5 release, the variable varName passed to incr may be unset, and in that case, it will be set to the value incre- |
ment or to the default increment value of 1.
Add one to the contents of the variable x:
Add 42 to the contents of the variable x:
incr x 42
Add the contents of the variable y to the contents of the variable x:
incr x $y
Add nothing at all to the variable x (often useful for checking whether an argument to a procedure is actually integral and generating an
error if it is not):
incr x 0
add, increment, variable, value
Check Out this Related Man Page
set(n) Tcl Built-In Commands set(n)
set - Read and write variables
set varName ?value?
Returns the value of variable varName. If value is specified, then set the value of varName to value, creating a new variable if one
doesn't already exist, and return its value. If varName contains an open parenthesis and ends with a close parenthesis, then it refers to
an array element: the characters before the first open parenthesis are the name of the array, and the characters between the parentheses
are the index within the array. Otherwise varName refers to a scalar variable. Normally, varName is unqualified (does not include the
names of any containing namespaces), and the variable of that name in the current namespace is read or written. If varName includes names-
pace qualifiers (in the array name if it refers to an array element), the variable in the specified namespace is read or written.
If no procedure is active, then varName refers to a namespace variable (global variable if the current namespace is the global namespace).
If a procedure is active, then varName refers to a parameter or local variable of the procedure unless the global command was invoked to
declare varName to be global, or unless a variable command was invoked to declare varName to be a namespace variable.
expr(n), proc(n), trace(n), unset(n)
read, write, variable
Hello everybody, is a very simple question how can I increase the capacity of a disk wich is on a DS4300?, I have done the procedure on the Storage Manager but the space is the same on the AIX (5.3) , what should I do to obtain the new ammount of disk space? (16 Replies)
Just a couple days ago my /var/ partition was at 63% now its shot up to 83%.
I checked my log file sizes and they same ok
# ls -l |more
-rw-r----- 1 root root 3754 Aug 1 19:26 acpid
drwxrwxrwx 2 root root 4096 Aug 24 04:11 admserv
-rw------- ... (28 Replies)
I am somewhat new to Solaris - and very new when it comes to mounts.
My problem is that when I installed Solaris, I allocated way too little diskspace to my / mount (it first became obvious now, however, because of new needs).
bash-3.00# df -h
Filesystem size ... (25 Replies)
I have a text file with a number "001". I am trying to change this number every hour and increment by "1". So every hour it would add +1 to that number. I am able to change the file with sed but unable to have it increment it by "1" without me adding that to the sed command. Any help is... (23 Replies)
We have a sftp server which creates files daily and keeps 6 months of files on the server. We are creating a daily job to get the files and load into database. My problem is "how to get ONLY those files which got created after my last get". Let me provide some more details to it.
Below... (15 Replies)
I have been trying to increment the value of variable to 1, 2, 3 etc. but, it displays
Could anyone help out with this?
for i in *.*
mv $i $j
Any help is appreciated? (24 Replies)
I like to increase swap size for my current server running solaris 10.
Seems like the system is not using it's full 16G of physical memory.
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,1 16 1058288 1058288
# swap -s
total: 4125120k bytes... (17 Replies)
In the below script i am trying to check and list the file names, get the last file with highest version number and then increment the version number when i create another file. Example: file1 is COBANK_v1.xml and file2 i want to put it as COBANK_v2.xml, to achieve this i am using awk... (15 Replies)
I have number in file which contains date and serial number:
The last two digits are serial number (00). So maximum of serial number is 100.
After reaching 100 it becomes 00 with incrementing 10 which is day with max 31.
after reaching 31 it becomes 00 and increments 10... (31 Replies)
I have Solaris-10 server running ZFS file-system. ctdp04_vs03-pttmsp01 is one of the non global zone. I wanted to increase a /ttms/prod file-system of zone, which is actually /zone/ctdp04_vs03-pttmsp01/ttms/prod on global server.
I have added a new disk of 9 GB, which is emcpower56a and now I can... (16 Replies)
Please can I have some help in increasing /var in my solaris 10 server.
At the moment the size configured is small and I need to expand it:
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 869M 510M 307M 63% /
/devices ... (16 Replies)
I have solaris server running,
SunOS host 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Fire-280R
Filesystem Size Used Available Capacity Mounted on
/dev/md/dsk/d0 9.8G 8.7G 1.0G 90% /
/dev/dsk/c1t1d0s3 4.3G 7.7M 4.2G ... (17 Replies)
Hi Folks -
I'm looking for the best way to to increment fiscal weeks - allow me to explain.
At my one client, 10/01/17 was the beginning if year fiscal year 2018.
Each week, I need to manage a unique set of variable that are updated in my application - they are called substitution variables.... (31 Replies)