4 Commits (f058d7d647b1ede2304ef59f9b938fb55340144c)

Author SHA1 Message Date
alexberry 3f48743dee
g flag is per-line, not per-file
Make comment clearer
5 years ago
alexberry b2ef20e0d9
Forgot to add paths as utilised -i
Must add a file path when not piping to sed.
5 years ago
alexberry b2210a9ca2
Adding a few more useful examples.
Sed's cheat sheet was a little light, here are a few more examples.
5 years ago
terminalforlife 76109ca8cd Add 'sed' and give example of in-place changes
The `-i` flag with `sed` means "in-place", if you're curious; the use
thereof allows for making actual changes to the file, not just
superfluously, such as for additional parsing.

The `s///` is a simple substitution, wherein the `s` marks that it's a
substitution, the `/` marks the boundaries*, and the final boundary can
be suffixed with various flags, such as `g`, for global operations, -
and `i`, for case-insensitive operations.

* required, but the slash can switched for something else, if needed, -
such as `|`, which is commonly used for paths. For example:

  `s|/path/to/file|/path/file|`
5 years ago