I do not understand the command grouping in sed scripts. We use curly braces to group commands. I found some information in the first answer to the following question:
Using multiple sed commands.
But I still do not understand this properly. Could someone please explain this to me?
If you use
/Number/ s/N/n/;s/r//
Then r
s will be removed on all lines, not only those containing Number
. But, if you use
/Number/{s/N/n/;s/r//}
then r
s will be removed only from lines containing Number
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments