Command grouping in sed

sarthak

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?

choroba

If you use

/Number/ s/N/n/;s/r//

Then rs will be removed on all lines, not only those containing Number. But, if you use

/Number/{s/N/n/;s/r//}

then rs will be removed only from lines containing Number.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related