Howto read data into a shell script

Hi all,

I'm anew shell user, and want to now how to do that?
i have a files that have inside few raws of names of directories, i want to read only the lins that are a dir name how to do so.

the file looks like that
####################################
# This is the list of dirs files #
####################################
ver 1
upodate 01-01-2006
/usr
/etc
/usr/testing
/rama

i need to read only the files that start with /

thanks

Try something link:
cat <file> | grep ^/

grep ^/ filename | while read dirname
do
echo $dirname
done

would do

If you want to search only for lines which starts from / then use this code

for input_dir_row in `cat your_file`
do
echo "$input_dir_row" |grep -s "^/">>/dev/null && echo "$input_dir_row "
done

Any of the 2 will do

####################################
# This is the list of dirs files #
####################################
ver 1
upodate 01-01-2006
/usr
/etc
/usr/testing
/rama

grep '^/' data

/usr
/etc
/usr/testing
/rama

awk '$1~"^/"' data

/usr
/etc
/usr/testing
/rama