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

Process Execution

This section provides a quick overview of how the Korn shell interacts with Unix. For the following sections, it is assumed that you are logged as a regular user, therefore you have the default command prompt - $.

Multiple Commands

Multiple commands can be given on the same line if separated with the ; character. Notice that the command prompt is not displayed until the output from all three commands is displayed:

						$ pwd ; ls dialins ; echo Hello
						/home/anatole
						dialins
						Hello
						$
					

This is also useful when you want to run something more complex from the command line, like rename all the files in the current directory using flow control commands:

						$ for i in $(ls); do mv $i $i.bak; done
					

The for loop command is covered in more detail ...

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