I need a bash script to format a text file. It must add a blank line before a range of numbers.
Something like the examples in the images below. I am trying:
sed '1{x;d};$H;/^([1-9][0-9]{0,2}|[1-4][0-9]{3}|5000)$/{x;s/^/\n/;b};x '/home/name/zxc' > vvvv
but it does’t run.
Thanks in advance.
How would this work for you:
From http://sed.sourceforge.net/sed1line.txt