-bash: syntax error near unexpected token `newline’ for display command

The reason

display <filename>

gives you a syntax error near unexpected token newline is that the arrow brackets in whatever documentation you were following were not intended to be taken literally.

< indicates that the thing that follows is a filename to be used as input on stdin, and a > indicates that the thing that follows is a filename to be used for output on stdout; thus, a > at the very end of your command is a syntax error, because it expects a file name to follow, not a newline.

Rather, use:

display filename

Leave a Comment