I would like to replace a specific line range with Nan values. My line range is defined by variables for the first and last line I would like to replace, so for example:
startrow=3
endrow=6
Input file:
1
4
3
2
6
1
3
4
Desired output file:
1
4
Nan
Nan
Nan
Nan
3
4
I think this should be possible using sed. Help much appreciated!