UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: readChapter 4
The Bourne Shell and Korn Shell
Next: Reference: redirect
 

readonly

readonly [variable1 variable2 ...]
readonly -p

Prevent the specified shell variables from being assigned new values. Variables can be accessed (read) but not overwritten. In the Korn shell, the syntax variable=value can assign a new value that cannot be changed. The second form is specific to ksh93.

Option

-p

Print readonly before printing the names and values of read-only variables. This allows saving a list of read-only variables for rereading later.


Previous: Reference: readUNIX in a Nutshell: System V EditionNext: Reference: redirect
Reference: readBook IndexReference: redirect

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System