What does the following command mean:
sed -e '/SUBCKT\ REDBK128S4_LC/,/ENDS/ d' $1
What does ,
stand for?
If you specify two addresses, then you specify range of lines over which the command is executed. In your sed
expression, it deletes all lines beginning with the line matched by the first pattern and up to and including the line matched by the second pattern.
It specifies a RANGE
over which to apply the d
command.
Ranges can be specified with patterns like this:
sed -e '/START/,/END/ command' # apply command on lines between START and END pattern
or with line numbers like this:
sed -e '1,35 command' # apply command on lines 1 to 35
or with a mixture, like this:
sed '1200,$ {/abc/ command}' # apply command on lines 1200 to end of file that contain "abc"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With