0

Why this is working

gdbus monitor -y -d org.freedesktop.login1 | grep org

Filtering output lines containing "org"

This is working

gdbus monitor -y -d org.freedesktop.login1 | (while read LINE ; do echo "$(date) $LINE" ; done)

Printing date before line output

But this is not working.

gdbus monitor -y -d org.freedesktop.login1 | grep org | (while read LINE ; do echo "$(date) $LINE" ; done)

The intention here is to print out date before line output only for lines containing "org"

Alex
  • 308

0 Answers0