Is there a way to print a document from the nano text editor, i.e. send it to a printer to be physically printed out? I see that vim and emacs have this feature but I like the simplicity of nano. If not, is there a way to print the document with a linux command?
I can see no mention of a print command in
nano's manual and it would surprise me to find one. The traditional method of printing in *nix systems is the
$ lpr foo.txt
DESCRIPTION lpr submits files for printing. Files named on the command line are sent to the named printer (or the default destination if no destination is specified). If no files are listed on the command-line, lpr reads the print file from the standard input.
You can also use a slightly more modern equivalent,
DESCRIPTION Enscript converts text files to PostScript or to other output lan‐ guages. Enscript can spool the generated output directly to a speci‐ fied printer or leave it to a file. If no input files are given, enscript processes the standard input stdin. Enscript can be extended to handle different output media and it has many options which can be used to customize the printouts.