miércoles, 17 de junio de 2009

Getting last part of a string in shell script

# If we have the string

string="my string.hello.world"

# to get the last part considering the field separator = "." execute:

echo ${string##*.}

No hay comentarios:

Publicar un comentario