File handling

my input for a script is another csv file
but in that file say 7 lines are there ...
how can i get line by line to that input

for example :
>cat link.csv
www.yahoo.com,yahoo
www.google.com,google
www.unix.com,unix

another file
in that file i need to ping the above links

ping link.csv_line_one_column_one
ping link.csv_line_second_column_one
ping link.csv_line_third_column_one

for this pupose
how can i get that csv file with line by line

It would help to know what Operating System and Shell you have.

Many versions of "ping" default to "continuous ping" and never finish.
In my version the parameter "-n 3" will try three times, yours may be different.
Shell code is for most Bourne-like shells such as: sh, ksh, bash and Posix. Some would replace "cat" with an inward redirect if that shell will allow it.

cat link.csv|awk -F, '{print $1,$2}'|while read url title
do
        echo "Pinging ${title}"
        ping "${url}" -n 3
done
#!/bin/bash

linecount=$(sed -n '$=' link.csv)
i=1
while [ $(( linecount -= 1 )) -gt -1 ] ; do
 echo "pinging `sed -n "$i s/.*[^,],//p" link.csv`"
  ping `sed -n "$i s/,.*//p" link.csv`
((i++))
  done