Skip to content
Advertisement

Getting a part of string in tcl

I’m trying to split the following string : Groups/Group#1.rpt to get only the word Group#1.rpt using tcl ; I did the following but the output was empty :

JavaScript

Advertisement

Answer

This is a job for a specific built-in: file tail!

JavaScript

Don’t use string manipulation directly for this; there are some complex nuances on different platforms. This command handles all the tricky edge cases for you.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement