Previous slide Next slide Back to the first slide View text version


Notes:

The example above demonstrates how one can quickly remove the two commands tput smso or tput rmso; which enables and disables standout mode for a text screen session. The scenario for this is that the system you are currently doesn’t include the tput(1) command.

In defining the expression we want to:

In the replacement string includes nothing to replace. Thus tput smso or tput rmso are being removed wherever they exist. Notice the g character at the end of the last character. This is necessary to perform the required global substitution. Otherwise, the first occurrence will be substituted for only.

Notice this time we’re using the colon (:) character to delimit the expression and replacement string. The thing to remember is that the character immediately following the s (substitute directive) designates the delimiter.