Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

CSM Tcl - replace substring in probe

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
New Member

Re: CSM Tcl - replace substring in probe

'regsub' command solved described problem.

520
Views
0
Helpful
1
Replies