why “extra characters after command” error shown for the sed command line shown?

后端 未结 1 1461
深忆病人
深忆病人 2020-12-18 04:54

I have given the command line as shown below,

command:

sed \'/dump 0 $2 $3 $4 $5/dump 1 $2 $3 $4 $5/g\' base_file.properties

error

相关标签:
1条回答
  • 2020-12-18 05:13

    It appears that some of the variables are expanding to values that contain a /. Use a different delimiter that isn't contained in any of the variables, e.g.

    sed 's@dump 0 $2 $3 $4 $5@dump 1 $2 $3 $4 $5@g' base_file.properties
    

    (Your first command isn't a valid sed expression.)

    0 讨论(0)
提交回复
热议问题