Tail doesn't work in script loop
One hundred command line tools in a small and portable binary.
Brought to you by:
stahlworks
Hi, "tail" option seems to not work properly in loop.
The following script doesn't work. When I run it, it does:
label main
+wget http://10.82.3.136:280/modsecurity.log
+then tail modsecurity.log
+sleep 15000
+loop
+end
My workaround is :
label main
+wget http://10.82.3.136:280/modsecurity.log
+then run "sfk tail modsecurity.log" -yes
+sleep 15000
+loop
+end
Thanks anyway for this tool.
SFK version 1.8.1 on windows
when tail is reached multiple times by +loop,
then as it is now, it blocks and waits for the file to be changed by a different process.
(which never happens here as the current sfk process does the actual file creation).
i will add an option -nowait for such cases in the next update.
the workaround with run is correct, you may as well use
Ok, thanks.