Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 31st, 2002, 05:09 PM
sclark sclark is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 12 sclark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #2  
Old August 5th, 2002, 01:31 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
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)
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #3  
Old August 5th, 2002, 02:01 PM
sclark sclark is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 12 sclark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
they

they told me to ask in here

Reply With Quote
  #4  
Old August 5th, 2002, 04:33 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
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

Reply With Quote
  #5  
Old August 5th, 2002, 05:56 PM
sclark sclark is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 12 sclark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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!

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > tail -f problem.....please help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway