Why create the file at all?

disk_check = `df -k`  # shell out for the info directly
disk_check_lines = disk_check.split("/\n") # break it up
disk_check_lines.each { test } #do your real test

William

On Nov 10, 2006, at 12:35 AM, Vihan Pandey wrote:

>> 1. Generate a file (df -k > filename.txt)
>
>
> Your logic is correct, but if a human being is monitoring that disk  
> space,
> it would be better to use df -kh so you get ``easily interpretable"  
> values,
> the `h' for human readable form. This is a well know fact, but i just
> thought i'd mention it anyway.  :-)
>
> Regards,
>
> - vihan