Take a look at the man script
:
SYNOPSIS
script [-a] [-c command] [-e] [-f] [-q] [-t[=file]] [-V] [-h] [file]
Notice that last [file]
part. By default, if you simply run script
without specifying where to store the file, it will save everything to a file called typescript
. By contrast, if you run script somefilename
everything will be saved to somefilename
.
Now if we run file
command on typescript
to determine the file's type, we get this:
$ file typescript
typescript: ASCII text, with CRLF, CR, LF line terminators, with escape sequences, with overstriking
As you can see, you've got simple text document there that is in no way related to Microsoft's TypeScript. Even more so, since this is a simple text document you should be able to print it with lpr
command easily.
Word of caution though, if you have output of ls --color -F
there, you might run into trouble, because ls
adds special characters to colorize the files based on their type. Thus using simple \ls
or dir
is recommended