O'Reilly logo

Linux and Unix Shell Programming by David Tansley

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

14.1. What is a shell variable?

Variables let you customize your working environment. You use variables to hold information that you want to use yourself, to let the system know more about you. Variables are also used to hold constant information. For instance, there is a variable called EDITOR. Now there are not that many editors around, but which is your favourite? Assign this name to the EDITOR variable, and that’s what you’ll use all the time if you use cron or other applications that require you to use an editor. The system looks for the value held in the variable EDITOR, and will use that as your default editor.

Here’s an example. Our audit system has logs that need to be edited. When I select this option from the menu, the application ...

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