String Editing (Colon) Operators

When the C shell and bash do history substitutions () they can also edit the substitution. The C shell - but not bash - can also edit variable substitutions (). 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