http://git.etherboot.org
/
people
/
lynusvaz
/
gpxe.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Arithmetic parser with string comparisons
[people/lynusvaz/gpxe.git]
/
src
/
tests
/
arith_test.gpxe
1
#!gpxe
2
echo $(17*2/(12-3))
3
echo $(32 == 4*(10-2)) $(12 >= 3) $(12 < 3)
4
echo $(y == y)
5
echo $(-(-42) )
6
echo $(4-+2*4*(5-2))
7
echo $(y == -2)
8
set a $(2*5)
9
echo $(${a} << 4 % 256)
10
echo $(12*((3+4)/2))
11
set i 258
12
echo $(12*3/2) $(45*2/(44-2))
13
set num 10
14
set serv ${num}.0.0.$(${i} & 255)
15
echo ${serv}