How to format the output of a grep with a regex pattern to match between a string and character
<p>I have been working on a bash script that greps occurences of a string from a logFile into an outputFile to monitor its frequency. I want to filter this even further and use the result of that grep to then format a section of the string to be my end result.</p>

<p>Currently my grep is as follows to get the section of the logFile output that I need:</p>

<pre><code>grep -n -A 1 "No entry for this particular code type" logFile.txt &gt;&gt; outputfile.txt
</code></pre>

<p>This gets the full line that starts with that string and will look like the following, with the value of code type changing throughout the logs constantly:
"No entry for this particular code type, code type: 001123." etc.</p>

<p>I want to parse the resulting lines like the above which are outputted from the grep, and just retrieve the value between the string "code type:" and the character ".". 
This would then give me values like 001123</p>

<p>I have been looking online for a solution and nothing that I have tried has worked out. Any suggestions would be greatly appreciated.</p>