cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
810
Views
0
Helpful
1
Replies

CSM Tcl - replace substring in probe

Martin Kyrc
Level 3
Level 3

Hello,

I would like in probe script replace substring in some string. I found command 'string map'. It's working (on linux machine with Tcl v8.4):

# $url - '/path/to/script_[IP].cgi'

# $search - '[IP]'

# $ip - $csm_env(realIP);

#

# next row replace '[IP]' substring in '/path/to/script_[IP].cgi' with IP of real server.

set url [string map [list $search $ip] $url]

CSM supports only Tcl version 8.0. In this version is this command not supported.

Can anybody help me with replacing substring on Tcl v8.0?

--

martin

1 Reply 1

Martin Kyrc
Level 3
Level 3

'regsub' command solved described problem.