I'm using sed to add the date at the beginning of every lines given by a command (which use vlc and never stops...). I found this way on another stackexchange post and that works as expected.
command | sed "s/^/$(date +%Z-%Y-%m-%d-%T) /" &>> $LOGFILE &
Now I want to use that from a script file as a background process. My problem is that the script never finish and stop on this line.
If I understand well sed never finish as long as command is running but anyway it should run in background and go to the next step?
If I remove the sed part the script ends up as expected.
I'm running GNU bash, version 4.2.53(1)-release (x86_64-redhat-linux-gnu) on Centos 6.4