带有double s的sed表达式

时间:2019-12-13 16:05:01

标签: sed

请在以下位置取消sed表达式:

PACKAGE=`grep package $MANIFEST_FILE | sed 's/.*package="//;s/".*//'`

我听不懂这部分:

//;s/

1 个答案:

答案 0 :(得分:1)

您实际上有两个sed替换命令,以;分隔:

s/.*package="//  # replace anything on the line before 'package=' string + string
s/".*//'`        # replace " and all the rest of the line after this character