O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Input/Output Commands

The Korn shell provides a number of input/output commands, which are covered in the following sections.

The print Command

You've already seen this command a hundred times since it was introduced in Chapter 3, but here it is again. This is a more formal definition of the command that describes the other things it can be used for. The print command displays arguments according to options with this format:

						print [options] arguments
					

Without options, special characters, or quotes, each argument is displayed separated with a space, and all the arguments are terminated with a newline:

						$ print X          Y          Z
						X Y Z
					

Notice that all the extra whitespace between the arguments was truncated. We could keep the whitespace by enclosing the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required