Open txt and store line in a var

Hi

I realy need to find a way to do a script that does the following:

search a word in a txt file then store on a var the letters that are on the right

like
this is an exemple, I want to store from here ...abcdefg...

so I need a var that receive ...abcdefg...

Is that possible?
sorry if this is too basic but is my first thread

value=""
# do this 
grep -q 'search text' inputfile && value="search text"

# or you can do this  pick one or the other
awk -v txt="search text" '{ if index($0, txt) > 0 ) { print txt; exit}' | read value

# then find out if it was in the file
if [ -z "$value" ] ; then
  echo "not found"
fi
echo "$value"

VARIABLE=`cat filename | grep pattern | awk '{ print $2 }'`

Where what you want to store in the variable is in the second column of the line.

I'm trying with this one. I guess that the first search text and the secund should be the same? so if I'm searching for 'lib' I should type

grep -q 'lib' /home/ruben/Desktop/rsyncbackup/2tuesday/diff.txt && value= "lib"

thanks a lot for your help

why exactly do you need a 'cat' and a 'grep'?

you could read a file line by line, and store the entire line in a $VARIABLE, and then process the line further from there:

while read LINE ;do
 "start processing the $LINE variable"
done < file_to_read

ok now I have this praticular case.
I do

cat -n /home/ruben/Desktop/rsyncbackup/2tuesday/diff.txt � grep lib

and the output is:
1 change: lib32
2 metadata the same, data changed: lib32/jniwrap.lic
3 new: lib32/ruben file
4 new: lib32/ruben file 2
5 new: lib32/ruben file 2~

Is possible that I save in a array something like
array(0)=lib32/jniwrap.lic
array(1)=lib32/ruben file
array(2)=lib32/ruben file 2
array(3)=lib32/ruben file 2~

thanks for supporting me

$ cat ./fill_array.ksh
#!/bin/ksh

ARRAYIDX=0
grep lib /home/ruben/Desktop/rsyncbackup/2tuesday/diff.txt|cut -d':' -f2|grep '/'|while read LINE
do
   ARRAY[ARRAYIDX]=$LINE
   print "ARRAY($ARRAYIDX)=${ARRAY[ARRAYIDX]}"
   ARRAYIDX=$(($ARRAYIDX+1))
done

exit 0

$ ./fill_array.ksh
ARRAY(0)=lib32/jniwrap.lic
ARRAY(1)=lib32/ruben file
ARRAY(2)=lib32/ruben file 2
ARRAY(3)=lib32/ruben file 2~

can I use #!/bin/sh instead of #!/bin/ksh