If you want to print a file that has plain text (not PostScript or some other page description language), you can indent the printout by adding some spaces to the start of each line. Use to add a TAB or two (if your printer can handle TABs) - otherwise, spaces - to the start of each line. Here's a simple command that adds four spaces to the start of each line of the logdata file, then prints with lpr:
sed 's/^/ /' logdata | lpr
You'll run into trouble if the file you're printing has any TABs in it though, because the extra spaces at the start of each line can mess up the tabstops. In that case,first:
expand logdata | sed 's/^/ /' | lpr
Thecommand makes a nicely formatted printout. You can indent its output, too. If your pr doesn't have a -o (offset) switch, though, pipe its output through sed:
pr logdata | sed 's/^/ /' | lpr
That doesn't always work. If there are TABs in the file, pr may not expand them - though some versions of pr have a -e switch to do that. Also, your indentation will indent the heading on each page - too much indentation can shove the heading off the right-hand side of the paper. Here's a better command to handle those problems. It expands the TABs and indents the body but doesn't indent the heading:
expand logdata | sed 's/^/ /' | pr -h logdata | lpr
logdata puts the filename at the top of each page
(because pr can't get the name otherwise).
Omit that if you don't want it.
Thescript lets you set the indentation with a command-line option.