* `-n` - no new line
* `-e` - enable interpretation of "\"
How the hell I could know that \u2018 it is "left single quotation mark"? These codes could be found in `gnome-characters` application or on websites like https://www.unicodepedia.com/unicode/general-punctuation/2018/left-single-quotation-mark/
So finally to variables are assigned values: $SDQUO="‘’"; $RDQUO="“”"
* `s/text_to_find/replace_text/g` - search (`s/`) for "text_to_find" and replace it with "replace_text" and do it for every occurrence (`/g`)
* text_to_find=`[‘’]` - characters that should be found
* replace_text=`'` and `"` - characters that should be replaced with. In scripts character are presented as `\'` and `\"` because `'` and `"` are special characters and to disable their "special powers" - they need to be preceded with `\`.
Ugh... Explain it is not easy... Probably my explanation is not precise enough and need to be... further explained:) Anyway for "beginner scripter" like me - it should be a little more understandable now;)
In Linux Firewall Cheat Sheet .pdf there is little mistake in section `Firewallcmd: remove ports and services` - line with `--add-port` should be removed...
Great, and explanation is where?
`echo` explanation:
* `-n` - no new line
* `-e` - enable interpretation of "\"
How the hell I could know that \u2018 it is "left single quotation mark"? These codes could be found in `gnome-characters` application or on websites like https://www.unicodepedia.com/unicode/general-punctuation/2018/left-single-quotation-mark/
So finally to variables are assigned values: $SDQUO="‘’"; $RDQUO="“”"
`sed` explanation:
* `-i` - edit file "in place" (overwrite)
* `-e` - execute script
Script 1: "s/[‘’]/\'/g"
Script 2: "s/[“”]/\"/g"
* `s/text_to_find/replace_text/g` - search (`s/`) for "text_to_find" and replace it with "replace_text" and do it for every occurrence (`/g`)
* text_to_find=`[‘’]` - characters that should be found
* replace_text=`'` and `"` - characters that should be replaced with. In scripts character are presented as `\'` and `\"` because `'` and `"` are special characters and to disable their "special powers" - they need to be preceded with `\`.
Ugh... Explain it is not easy... Probably my explanation is not precise enough and need to be... further explained:) Anyway for "beginner scripter" like me - it should be a little more understandable now;)