perl -nle 'm/type="stored-procedure"/ and m/id="([^"]+)"/ and print "$1"' {input_file}