July 31st, 2002, 06:09 PM
tail -f problem.....please help
i don't know if this is the right place ( if not sorry) can some one tell me what is going on here: here is the problem
if i run this
tail -f cardout.dat <---------- works fine BUT if i try this
tail -f cardout.dat | perl4 sclrk.pl /4 /otest.log <-----this don't work but this does:
tail -1000 cardout.dat | perl4 sclrk.pl /4 /otest.log
WHY can't i get the -f to work? ( i need the -f to work) also to this is in windows/dos
is there a way to fix it? or is there other program that is like tail -f that i can get?
August 5th, 2002, 02:31 PM
1. do you use "tail" on windows? the linux forum is three lines above...
2. tail -f leaves the file open for reading. tail -1000 closes it after reading. probably itīs the input buffering feature of perl. you should make it work if you disable input buffering. (canīt tell you how, ask in the perl forum)
August 5th, 2002, 03:01 PM
they told me to ask in here
August 5th, 2002, 05:33 PM
you are not supposed to ask the same question again...
simply ask: "how do i disable input buffering in perl?" ... why do i need to tell you this twice?
August 5th, 2002, 06:56 PM
when i posted this question in the perl i was told to post here I ( i posted in the perl one first) WAS EXPLAINING WHY I POSTED HERE!! I didn't mean THE NEW question. also to THAT IS NOT the problem:
here is why:
Unfortunately the way Dos or a dos window handle STDIN and STDOUT is not the same way as it works in Linux/Unix. Tail is a ported Unix utility that displays the last few lines of a file and if run with -f will do it interactively (that is any changes to a file will be sent out to STDOUT). In linux/unix this is a great tool for monitoring changes to a file and sending those changes to a waiting program that collects it's input from STDIN. This does not work as expected in DOS. tail -f will display the changes in a file but using the | (pipe) command to send it to a waiting program will not work as it should and dos not seem to pick up the piped data. (hangs). There is no fix I can think of.
so to answer your other question yes i uses it in windows I WAS HOPING THAT SOMEONE MADE A PROGRAM THAT WOULD LET THIS WORK!!!
so good night to you to!