Kind of a basic awk question but just trying to take the following intervals:

    chr1 10001 10150
    chr1 10008 10090
    chr1 10025 10207
    chr1 10058 10172

And generate a file output with a single command that in the first column has the midpoint of each and in the second column next to it has the entire interval length, such as this:

    10075 149
    10049 82
    10116 182
    10115 114

Thanks.
    $ awk '{print int(($2+$3)/2), $3-$2}' test.txt
    10075 149
    10049 82
    10116 182
    10115 114

