From Get docs
After the optional word designator, you can add a sequence of one or more
of the following modifiers, each preceded by a ‘
- Remove a trailing pathname component, leaving only the head.
- Remove all leading pathname components, leaving the tail.
- Remove a trailing suffix of the form ‘
.suffix’, leaving the basename.
- Remove all but the trailing suffix.
- Print the new command but do not execute it.
newfor the first occurrence of
oldin the event line. Any delimiter may be used in place of ‘
/’. The delimiter may be quoted in
newwith a single backslash. If ‘
&’ appears in
new, it is replaced by
old. A single backslash will quote the ‘
&’. The final delimiter is optional if it is the last character on the input line.
- Repeat the previous substitution.
- Cause changes to be applied over the entire event line. Used in conjunction with ‘
s’, as in
gs/old/new/, or with ‘
- Apply the following ‘
s’ modifier once to each word in the event.