Chapter 1. The Environment

The assumption of this book, and particularly this chapter, is that you are at least familiar with a shell. You have typed in some commands—such as changing your password—and are fairly comfortable with the environment. The chapter begins by explaining a few items common to all scripts, including comments and the cryptic #!/bin/ksh that mysteriously lurks on the first line of most shell scripts. After that, a few environment issues are explained.

This chapter teaches you the following:

  • The meaning of #! /bin/ksh

  • How to understand file and directory permissions

  • How to use the chmod and umask commands

  • How to provide comments in your script

  • How to use the .profile file

  • What the Korn shell environment options are

  • How to use shell ...

Get Korn Shell Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.