Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’d solve your exact problem like this:

1. Run one command with output to a file, possibly in the background. Since you want to watch the output, run “tail --follow=name filename.log”.

2. In a second terminal, run a second tail --follow on the same log file but pipe the output to a command sequence to find and extract the URL, and then pipe that into a shell while loop; something like “while read -r url; do do-thing-with "$url"; done”.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: