Mostrando entradas con la etiqueta shell script string. Mostrar todas las entradas
Mostrando entradas con la etiqueta shell script string. Mostrar todas las entradas

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##*.}