Hi All
I'm trying to extract the line just above a regexp and all lines after this.
I'm currently doing this in two steps
sed -n -e "/^+---/{g;p;}" -e h oldfile.txt > modified.txt
sed -e "1,/^+---/d" -e "/^$/d" oldfile.txt >>modified.txt
Sample
sometext will be here
sometext will be here
sometext will be here
sometext will be here
ACD (A)
+------------------------+------------------------
(some info) 19082
(something else) 19082
Result
ACD (A)
(some info) 19082
(something else) 19082
Is there a way I can achieve this using a one liner?