Hello. The solution sent yesterday by Mikhael does not solve the problem as Offer formulized it. For example, what if the input file has an odd number of lines? The oneliner will hang... waiting for input. -- Shlomo Yona shlomo at cs.haifa.ac.il http://cs.haifa.ac.il/~shlomo/