# Include only a part of external file in minted

I am using minted package to display source code from an external file using the inputminted command but I don't want to display the whole file but a certain line number if possible, say from 2 to 15. Is that possible?

\inputminted has two optional arguments, firstline and lastline, that do exactly as the name suggests.
\inputminted[firstline=2,lastline=15]{language}{file}

• +1 for your suggestion....and for my reopen of the my question (very interesting), different \mathcal J. – Sebastiano Apr 26 '18 at 21:12