![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 09:25 AM |
| Why generate "ash and bash" different output for same bash script? | s. murat | Shell Programming and Scripting | 0 | 05-26-2008 04:19 AM |
| Bash under AIX 5.3 | taupin | AIX | 4 | 03-21-2008 03:03 AM |
| Bash: how to do it? | sopel39 | Shell Programming and Scripting | 3 | 11-02-2007 01:35 AM |
| Bash it! Bash it! | SoulForge | Shell Programming and Scripting | 5 | 11-22-2002 10:02 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Bash squares and exponents
I'm trying to write a simple bash script and I need something like
var=2^(5+i) where i is another variable. How would do I this in bash? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
bash v 2.02 & up has the ** operator which is exponentiation
Code:
i=2 var=2**(5+$i) |
|||
| Google The UNIX and Linux Forums |