Finding a string in ubuntu: grep-i-n 'ip 10.130.51' *
to do research into the folder containing the files in one or piiu 'which is expected to be contained in the string to examine. Show
a string on the output
-> puts Hello
-> puts "Hello World"
Set value of a variable

->
set a apple
->
puts [set a 2]
INSERT COMMENT
COMPUTE MATHEMATICAL EXPRESSION
->
expre 2+4+5
->
proc + {a b} {expr $a+$b}
Explanation-> The procedure is called "+", it has two ingress arguments "a" e "b", and everytime is called it execute the code: "expr $a+$b"
Example-> + 3 4 7
IF ->
proc abs x {
if {$x > 0} { return $x } else {
expr -$x } }
Example of use
puts [abs 10]
IF ELSE
->
set max [if {$a > $b} {expr $a} {expr $b}]
->
if {$a > 0} {
set x "It's positive" } elseif {$a CICLO FOR
for {set n 1} {$n ping 172.16.0.2 }
0 comments:
Post a Comment