UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 9.5 Build Strings with { } Chapter 9
Saving Time on the Command Line
Next: 9.7 String Editing in ksh and bash
 

9.6 String Editing (Colon) Operators

When the C shell and bash do history substitutions (11.7) they can also edit the substitution. The C shell - but not bash - can also edit variable substitutions (6.8). For instance, in the first example below, when !$ contains /a/b/c, adding the "head" operator :h will give just the head of the pathname, /a/b.

For a complete but very terse list of these operators, see the csh manual page. We hope the examples below will help you understand these useful operators.

- DR


Previous: 9.5 Build Strings with { } UNIX Power ToolsNext: 9.7 String Editing in ksh and bash
9.5 Build Strings with { } Book Index9.7 String Editing in ksh and bash

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