1. (including characters & amp; lsquo; 22 & amp; rsquo;) insert the text koko & quot; gggggggggggg & quot; sed-I & amp; #39; on the current line; /22/I \ koko & quot; gggggggggggg & quot; & amp; #39;/root/soft/iptables2. (including characters & amp;
1. (including the character '22') insert the text koko = "gggggggggggggg" on the current line"
Sed-I '/22/I \ koko = "gggggggggggg"'/root/soft/iptables
2. insert the text koko = "gggggggggggg" under the current line (containing the character '22"
Sed-I '/22/a \ koko = "gggggggggggg"'/root/soft/iptables
3. (including the character '22') use the new text to change the text koko = "gggggggggggggg"
Sed-I '/22/c \ koko = "gggggggggggg"'/root/soft/iptables
4. replace the character 22 with kokotest within the range of the entire line. if there is no g mark, only the first matched 22 in each line will be replaced with kokotest.
Sed-I's/22/kokotest/g'/root/soft/iptables
5. delete the second line of the/root/soft/iptables file
Sed-I '2D '/root/soft/iptables
6. delete all rows from the second row to the end of the/root/soft/iptables file.
Sed-I '2, $ d'/root/soft/iptables
7. delete the last line of the/root/soft/iptables file
Sed-I '$ d'/root/soft/iptables
8. delete all rows containing 22 in the/root/soft/iptables file.
Sed-I '/22/'d/root/soft/iptables
Author: Magic World"