Daily Archive for Febrero 16th, 2008

Shell-script: substrings

  • english
  • spanish

Es posible extraer subcadenas de una variable con el formato:

${VARIABLE:INICIO:TAMAÑO}

Ejemplo:

$ A=abcdefghi $ echo ${A:3:2} de
Enviar a:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BarraPunto
  • Meneame
  • Slashdot
  • Technorati
  • YahooMyWeb



Creative Commons Attribution-NonCommercial 2.5 Spain
Creative Commons Attribution-NonCommercial 2.5 Spain