I have to use the AdaBrowse Html generator to create a bunch of formatted files. Unfortunately, all of these files contain headers before each function or procedure that follow no consistent form of formatting.
-- Example 1 - new
--##################################################
-- Name: Example
-- Version: 1.0
-- Description: Shows Example
-- a 12-bit field containing the an example.
-- Inputs: AN_Example.
-- Outputs: None
-- Return Values: Examples
-- Callers:
--
-- Callees:
--
----------------------------------------------------------
-- Example 2 - new
--##################################################
-- Name: Example
-- Version: 1.0
-- Description:
-- Shows More Examples
-- in a 12-bit field containing the an example.
--
-- Inputs: AN_Example.
-- Outputs: None
-- Return Values: Examples
-- Callers:
--
-- Callees:
--
----------------------------------------------------------
AdaBrowse has a very good formatting option using sed but I can't get it to extract only the lines from "-- Description:" to (and not including) "-- Inputs:"
The closest Iv'e gotten was with the command:
sed -r 's/.*(Description:[^Inputs:]*).*/\1/g
But it grabs everything. How can I extract the said lines?
'/START/,/END/ {PROGRAM}'
executes PROGRAM on the part of the file between the string START and the next occurrence of the string END. – WAF Jun 09 '16 at 13:08