开发者

Using OR and command substitution

The following开发者_如何学运维 command works as expected...

tail /var/log/mysqld.log | grep `date '+%y%m%d' --date='1 day ago'`

But this does not...

tail /var/log/mysqld.log | grep (`date '+%y%m%d' --date='1 day ago'` | `date '+%y%m%d'`)

I want to return the lines having yesterday OR today.


tail /var/log/mysqld.log | grep -e `date '+%y%m%d' --date='1 day ago'` -e `date '+%y%m%d'`
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜