Skip to main content

Thread: extract text


hi, need linux guru here. want extract text string. example:

111éé3'(5555helpyyunkkkgme009oiiip

need command counts 8 characters further after finding 'help' , extracts 2 characters, output of command should be: 'me'.

can done grep?

sorry simple question
d

may not smart proposal:

suppose string stored in $text

text1=`echo $text | sed 's/.*help........//'`
text2=${text1:0:2}
echo $text2

best regards,

luis


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [all variants] extract text


Ubuntu

Comments