While loop ln -s

I am trying to take a while loop to make soft links from several files from a folder based on a subset from a text file. What I mean is I want to make a soft link if a file exists in a certain text file.

$ cat file.txt 
$ ls input 

When I do the command

$ while read A B; do 
ln -s ./input/$A ./ 
done < file.txt 

I get the soft links for what I wanted but the links appear to be broken (normally they are blue but they appear red on my prompt.

Any ideas?

It works for me.
What is the output of file fish ?

BTW you don't need the variable B.

--ahamed

If directory: input is in the current working directory where you are running the script, it should work.

But if this directory is residing in the parent directory, you should specify ../input instead.

Just verify the path of your directory and files.

the input directory is in the current working directory. If I make the links using the while loop they are broken (in red) but if I make the links using the

 ln -s 

command the links work (they are blue).

Can you do set -x in the command prompt and execute the while loop. Alos what is the output of file fish command.

--ahamed

I am not sure what

set -x 

does.

The files dog cat and fish are binary that are around 7gb.

You can view the links with

ls -l dog cat fish