I'm trying to run a server that writes to $log (a txt file) and then find all the text in the logfile that starts with [1] and put it in another file. Here's my attempt. tee -a $log works along with everything else. The grep command doesn't though.
run="tail -n0 -f -s 0.01 $cmds | (while true; do $tron --userconfigdir $userconfigdir --userdatadir $userdatadir --vardir $var; done) | tee -a $log | grep '^\[1\]' > ${var}logs/chatlogs.log"
What can be done to copy all the text from tee -a $log starting with [1] to another file?
${var}logs/chatlogs.log? No output in${var}logs/chatlogs.logeven though you've thoroughly verified there should be somewhere there (by running the grep on$logindependently, for example) ? – huitseeker Jul 31 '11 at 9:54tee -a $logdoes it work? probably not – hmontoliu Aug 1 '11 at 15:47