Wednesday 21 December 2011

KSH: how to find the position of a substring in a string

KSH: how to find the position of a substring in a string

Hi all.
I need to get the substring PRUEBAS_RMAN_PARCHES from the following string
"BP Key: 47531 Status: AVAILABLE Tag: PRUEBAS_RMAN_PARCHES"
But the position and length may vary between different strings.
The string will always be preceded by the other string "Tag: ", so I'd like to use it as starting point
Anybody can please tell me the easy way to do it?
Thanks a lot.

No comments:

Post a Comment