I've got a file with two columns corresponding to start-end ranges like this:
awk '{print $2"-"$3}' file.txt
91082802-91082990
94018177-94018321
146945732-146945949
88701397-88701594
80922510-80922643
28800551-28800680
23612818-23613016
69178478-69178630
107524531-107524669
73153734-73154149
[...]
I would like to expand the start-end ranges to up to 500%, except if the range goes beyond a certain value, N=1000. If the start-end range is already above N=1000, I want to rewrite the start-end to a n=1000 window around the centre.
How can I do that with an awk/bash one-liner?