用sed修改配置文件id = 1timeA = "2012-03-04","2012-03-05","2013-03-06" timeB = "2012-03-04","2012-03-05","2013-03-06"我想修改timeB的时间,且保留空格,我该怎么写?我默认写的sed -i "s/timeB.*=/timeB =\"2012-04-04\",\"2012-04-05

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/14 20:19:16
用sed修改配置文件id = 1timeA =
x){>eEqjʓMuϦ?ٽ-3EV$37P22045050QApL!c0LI܉h:&>k gӷEɎ)O}>u󕻞-أTbg }Ovv

用sed修改配置文件id = 1timeA = "2012-03-04","2012-03-05","2013-03-06" timeB = "2012-03-04","2012-03-05","2013-03-06"我想修改timeB的时间,且保留空格,我该怎么写?我默认写的sed -i "s/timeB.*=/timeB =\"2012-04-04\",\"2012-04-05
用sed修改配置文件
id = 1
timeA = "2012-03-04","2012-03-05","2013-03-06"
timeB = "2012-03-04","2012-03-05","2013-03-06"
我想修改timeB的时间,且保留空格,我该怎么写?
我默认写的sed -i "s/timeB.*=/timeB =\"2012-04-04\",\"2012-04-05\",\"2013-04-06\"/g" file
但是我的空格丢了?有什么高招只修改 = 号后面的值?

用sed修改配置文件id = 1timeA = "2012-03-04","2012-03-05","2013-03-06" timeB = "2012-03-04","2012-03-05","2013-03-06"我想修改timeB的时间,且保留空格,我该怎么写?我默认写的sed -i "s/timeB.*=/timeB =\"2012-04-04\",\"2012-04-05
sed -i '/timeB/s/\=.*/\= \"2012-04-04\",\"2012-04-05\",\"2013-04-06\"/g' file