Read each line and saving the line in separate files

Hi Experts,

I am having a requirement like this;
Input file

EIM_ACCT.ifb|1001|1005
EIM_ADDR.ifb|1002|1004
EIM_ABD.ifb|1009|1007

I want to read each line of this file and pass each line,one at a time,as an argument to another script.
eg;
1.read first line->store it to a file->call another script
2.read second line->replace the contents of the above mentioned file with 2nd line and call script with 2nd line as argument.
3.read 3rd line->replace the contents of the above mentioned file with 3rd line and call script with 3rd line as argument.

I would be very grateful. Plese help me...

outputfile=/path/to/file/filename
while read rec
do
  echo "$rec" > $outputfile
  /path/to/myscript.sh  $outputfile

done < inputfile

Hi Jim,

Thanks for the reply but where do we give the input file name to be read?
also please let me know how to store the delimited fields in different variables.

Please excuse me as I am a newbie in Unix.

Thanks!
Ashish