I'm puzzled.
Please see these simple commands:
Code:
# dbus-monitor --system >> /data/eject.txt
This one works as expected ... dbus-monitor never terminates and whenever it outputs new lines, they are appended to "/data/eject.txt".
Code:
# dbus-monitor --system | grep "Eject"
This one does work too. Any line containing the string "Eject" appears immediately in my shell window.
Code:
dbus-monitor --system | grep "Eject" >> /data/eject.txt
This one does not work as expected. To be more precisely, nothing happens. Nothing gets written to "/data/eject.txt", nothing gets written on the screen.
So I tried
Code:
dbus-monitor --system | grep "Eject" | tee -a /data/eject.txt
Same result, nothing happens ... neither in "/data/eject.txt" nor on my screen.
As I said ... I am puzzled.
I suspect, I missed something elementary here about pipes and redirected output ...