使用sed 为时间增加空格分隔符

需求:  有个时间格式如下:  2021-02-1315:01:28

使用sed 命令批量将时间分割为 标准的时间格式; 

sed  -i  's/[0-9][0-9]:/  &/'  file
-i 参数, 替换文件内容.  不加i 不替换文件内容, 只在终端输出结果

猜你喜欢

转载自blog.csdn.net/weixin_50764555/article/details/120764692