On the other hand, in the following example we will not be reading from a file, but exporting/saving our results into a text file:

nmap -oN output.txt google.com

Nmap has the ability to export files into XML format as well, see the next example:

nmap -oX output.xml google.com