要打印部分字符串,请替换,
为.
I use command:
echo "${q:16:6}" | sed 's/,/./'
是否可以使用类似的东西:
echo "${q:16:6/,/.}"
因为它不起作用?
最近我更改了 letsencrypt 的日志配置,因为没有给定的配置并且我有文件:
letsencrypt.log
letsencrypt.log.1
letsencrypt.log.10
letsencrypt.log.10.gz
letsencrypt.log.11
letsencrypt.log.11.gz
letsencrypt.log.12
letsencrypt.log.12.gz
letsencrypt.log.13
letsencrypt.log.13.gz
letsencrypt.log.14
letsencrypt.log.14.gz
letsencrypt.log.15
letsencrypt.log.15.gz
letsencrypt.log.16
letsencrypt.log.16.gz
其中偶数文件有 1409 个字节,奇数文件有 0 个字节。然而,压缩文件有一些内容(不同)。日志轮换的配置是:
/var/log/letsencrypt/*.log {
daily
rotate 32
compress
delaycompress
missingok
notifempty
create 644 root root
}
我应该如何更改日志轮换配置以仅保留: