I would like to know how to change the position of a line in a file (preferably using sed). For example, consider the file that contains
goal identifier statement
let statement 1
let statement 2
forall statement
other statements
I would like to be able to do this
goal identifier statement
forall statement
let statement 1
let statement 2
other statements
where I change the position of the forall line and bring it after the goal line. forall and goal are regexps that can be used to identify the lines.