Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

288
Vistas
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 :

set verifyFile "Groups/Group#1.rpt" 
set verify_file_name [echo $verifyFile |cut -d "/" -f 2]
over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

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

set verify_file_name [file tail $verifyFile]

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.

over 4 years ago · Santiago Trujillo Denunciar

0

Donal's file tail answer is perfect for removing the directories from a file path.

If you have a "CSV" string using slash as the delimiter, you can use split and lindex

set verify_file_name [lindex [split $verifyFile /] end]
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda