Use with caution! Its a plain wrapper around sed and the input is not sanitized.
What it does
Changes every line of a text file according to a given regular expression.
Syntax
Use the sed-syntax -> s/find-pattern/replace-pattern/
Example
- s/x/-/ Replace all x with -.
- s/_.*// Splits a string after _ and replaces the rest with nothing.
- s/[^_]*_*// Splits a string after _ and replaces the first part with nothing.
- s/\s.*// Splits a string after whitespaces and replaces the rest with nothing.
- s/\S*\s*// Splits a string after whitespaces and replaces the first part with nothing.