I need to write the .his file showing me the radius all balls in pfc3d 7

I want to save the ball radius using Fish code. Can anyone help me modify the following code to save the radius of each ball with ball identity in any format such as .txt, .dat, etc? I am attaching the shortcode:

loop foreach local bp ball.list
    if ball.isgroup(bp) then
        local b_rad = ball.radius(bp)
        ball_rad = ball.radius(bp)
    endif
endloop