Chapter 7. The Interactiven Bourne Shell

The Interactiven Bourne Shell

Introduction

When you are at the command line you are using the shell interactively. The shell has a special built-in variable that contains a string of options. If one of the options is the letter i, the shell is running interactively. To test this, type in the following small script at the prompt:

case "$-" in
*i*) echo This shell is interactive ;;
*) echo This shell is not interactive ;;
esac

The Bourne shell offers you many features to make life easier when you are working at the command line. Although the Bourne shell isn't as robust in this area as the other shells discussed in this book, it provides ...

Get UNIX® Shells by Example Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.