#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    12
    Rep Power
    0

    Question tail -f problem.....please help


    hello all

    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?


    please help
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    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)
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    12
    Rep Power
    0

    they


    they told me to ask in here
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    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?

    good night,
    M
  8. #5
  9. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    12
    Rep Power
    0

    ok look


    ok look


    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!

IMN logo majestic logo threadwatch logo seochat tools logo