Shell-script: substrings

  • english
  • spanish

You can work with substrings in bash using the following syntax:

${VARIABLE:START:LENGTH}

Like in:

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

Artículos relacionados (o no):

0 Responses to “Shell-script: substrings”


  1. No Comments

Leave a Reply




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