NAME isprint - check if a file contains only printable characters SYNOPSIS isprint [ options ] [ file ... ] DESCRIPTION isprint reads a file and looks for non-printable characters (as defined by isprint(3)); if no such characters are found, isprint consider the file to be "a text file"; otherwise it's "a binary file"; directories and special files are considered "other." If the file is a symlink, isprint looks at the link target, not the link itself. By default, isprint displays one line per file, as follows: filename: word The value of "word" will be one of "text," "binary," "error," or "other." If the "-v" flag is given, the output will be as follows: filename: total printable non-printing where "total," "printable," and "non-printing" are integers representing the corresponding number of characters. If "-V" is given, the output will be: filename: word total printable non-printing If "-q" is given, output will be supressed, and the only indication of "printability" will be the exit status (described below). OPTIONS -e suppress errors -q quiet: no output, just an exit value; if multiple files are specified, the exit value will be the logical OR of the exit values for each file; errors are still printed (on stderr) -v verbose: print total characters, printable characters, non-printing characters -V extra verbose: print "text" or "binary" followed by the same output as "-v" (above) CAVEATS The options "-q", "-s", "-v", and "-V" are mutually exclusive. EXIT STATUS isprint exits with 0 if all the characters in a file are printable, with 1 if there are non-printable characters, 2 if the file is not a plain file, and 4 if there are any errors. If multiple files are given, the exit status will be the bitwise OR of the exit status of each file. SEE ALSO file(1), isprint(3) AUTHOR Adam Moskowitz