You can work with substrings in bash using the following syntax:
${VARIABLE:START:LENGTH}
Like in:
$ A=abcdefghi $ echo ${A:3:2} de
Este es mi blog. Hay otros muchos pero este es el mío.
You can work with substrings in bash using the following syntax:
${VARIABLE:START:LENGTH}
Like in:
$ A=abcdefghi $ echo ${A:3:2} de
| L | M | X | J | V | S | D |
|---|---|---|---|---|---|---|
| « Ene | Mar » | |||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | ||

0 Responses to “Shell-script: substrings”
Leave a Reply