Treating Strings with spaces

I have a file list.txt which has a list of file names with spaces between the file names like
/emptydir/file 1
how do i browse through the list.txt displaying the filenames. Almost all the file names in list.txt have space between them.This file list.txt is formed by using the find statement to find all the files in a given directory. Now i need to traverse through the list.txt and print each of the filenames in it. If someone has a suggestion to display the filenames without redirecting the output to the file list.txt, please let me know. That is much appreciated. Thanks in advance folks.

cat /emptydir/file\ 1

to see all the content of all of the files:

cat *

It isn't exactly clear to me what you mean....

Hi Scruti Thanks for the reply.

I think i misquoted. I want to print the names of the files and not cat the file itself. Hope this clears the confusion.

Hi,

You just want to get the file names ? Can the spaces be deleted ? If yes, can you try `tr -s " " ""` and remove spaces ? Will that help your purpose ?

Something like this then?

while read i ; do
  ls -ld "$i"
done<list.txt

To just display the filenames without putting the list into a file called list.txt .

find /emptydir/ -type f -print

Or if you then wanted to do something with each filename. Note the double quotes to preserve spaces.

find /emptydir/ -type f -print | while read filename
do
          echo "${filename}"
done