Hi,

how about

File.readlines("data.txt")[n]?

Thorsten

Am 10.05.2010 10:21, schrieb Siddarth Chandrasekaran:
> Or you could read it into an array, mess with it and write it back,
> although that's pretty ugly:
>
> array = File.open("junk").collect
>
> <do something with array>
>
> <write the array back into the file>
>
> Siddarth
>
>
>
> On Mon, May 10, 2010 at 4:19 AM, Bernd Ritter<commel / gmail.com>  wrote:
>    
>> Hi David,
>>
>> the only way I could think of right now would be to read all lines and
>> increment a counter while reading.
>>
>> Am 10.05.2010 09:52, schrieb David Chapman:
>>      
>>> Thanks. Question #2.
>>>
>>> How can I write/read a specificied line from the file?
>>>
>>>        
>>
>>
>>      
>