Use System Variables in Calculations (CAL Command)
You can use the getvar function to read the value of a system variable.
The syntax is
getvar( variable_name )
The following example uses getvar to obtain the point that is the center of the view in the current viewport.
With this method, you can also access the user system variables, USERI1-5 and USERR1-5.
For example, to retrieve the value stored in USERR2, enter the following:
u can use the getvar function to read the value of a system variable. The syntax is getvar( variable_name ) The following example uses getvar to obtain the …calculator I know is bc . … I have no idea how to calculate variables and output it to another variable. … ((rownum=nextnum+1)) but if you prefer an standard command you can use the let command, like let rownum=$nextnum+1 …. What would be the possible issues with an IQ based voting system.system-specific line … !/bin/bash TARGET=1305281500 CURRENT=`date +%s` echo $TARGET echo … You don't need to call expr for this actually just use bash's $(( expr )) feature. …. How to set a variable to the output from a command in Bash?command, use a command substitution: … If you want something even cooler than bc , here's dc (reverse polish calculator): … Browse other questions tagged bash scripts environment–variables bc …