How to Swap 30 & 40 in IP address 192.30.40.1 using TCL
script?
Answer Posted / siddalingesha
set ip 192.30.40.1
set sp [split $ip "."]
set l [lindex $sp 1]
set m [lindex $sp 2]
set n [lreplace $sp 1 2 $m $l]
set sip [join $n "."]
puts "$sip"
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers