在 Bash 的字符串输出中仅查找并回显日期(带格式)

Find and Echo only the date (with format) in String Output on Bash

我正在尝试在 bash 中获取 date "+%a %b %d %R:%S %Y"

这是示例命令和输出

$ xscreensaver-command --time XScreenSaver 5.32: screen non-blanked since Thu Oct 29 12:15:05 2015 (hacks: #184, #60)

我正在尝试获取字符串中的值 Thu Oct 29 12:15:05 2015

我怎样才能做到这一点?

尝试使用 GNU grep 追加:

2>&1 | grep -Po 'since \K.*(?= \()'

输出:

Thu Oct 29 12:15:05 2015