I've been trying to use sed as a part of bash script and this is how
A quick guide
A quick example explained:
Extracted from the second link (the detailed explanation)
The s Command
The syntax of the s command (which stands for "substitute") is: ‘s/regexp/replacement/flags’. The / characters may be uniformly replaced by any other single character within any given s command. The / character (or whatever other character is used in its stead) can appear in the regexp or replacement only if it is preceded by a \ character.
Matches any single character in list: for example, [aeiou] matches all vowels. A list may include sequences like char1-char2, which matches any character between char1 and char2. For example, [b-e] matches any of the characters b, c, d, or e.
The s command can be followed by zero or more of the following flags:
|g||Apply the replacement to all matches to the regexp, not just the first.|