Help with csh, read in a file line by line

I want to process some audio with:
sox $audio1 $audio2 trim $start_time $dur

How can I batch process them by read in a file containing the values for the variables above on every line, like:
1.wav 1.5 1
2.wav 2.5 2
...

I tried "foreach f (`cat file`)" but cannot read in line by line, and I just found that these is no env variable IFS for csh. Should I use bash script?

Thank you very much

 
while read line 
do 
 echo $line 
done < file 

The above code for getting the content line by line.

[indent] Top Ten Reasons not to use the C shell Csh problems Csh Programming Considered Harmful

[/indent]

Yes (or any POSIX shell).

while read audio2 start_time dur  ## adjust variable names as necessary
do
  sox $audio1 $audio2 trim $start_time $dur
done < "$file"
1 Like

Thank you very much.
It solves the problem.