The command you're looking for is grep, and the regular expression you want is ^b.*[ig].*o$.
grep is used like
grep 'EXPRESSION' INPUT-FILES
and will output the lines matching EXPRESSION to its standard output (the terminal, in this case).
The
^anchors the expression to the start of the line, and the$does the same but to the end..matches any single character and*matches any number of the previous expression, so.*matches any number (including zero) of any character.[ig]will match a singleiorg.All other characters (
bando) in this particular regular expression matches themselves.