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
  • Twitter
  • Facebook
  • Meneame
  • email
  • Print
  • PDF
  • RSS

Artículos relacionados (o no):

0 Responses to “Shell-script: substrings”


  • No Comments

Leave a Reply




Bear
Creative Commons Attribution-NonCommercial 2.5 Spain
This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 Spain.