[comp.sys.amiga.programmer] Unix like 'tail -f'

greendog@max.physics.sunysb.edu (Michael D Fischer) (01/18/91)

In article <685@caslon.cs.arizona.edu> dave@cs.arizona.edu (Dave P. Schaumann) writes:
>In article <1991Jan17.034047.18447@eecs.wsu.edu> rnelson@yoda.UUCP (Roger Nelson - Grad Student) writes:
>>Does there exist a UNIX like tail utility?  
>>Could similar functionality be achieved using something like Matt Dillon's
>>fifodev (which I intend to look at)?
>
>The functionality of 'tail' can be achieved quite easily.
>[etc...]
>
Tail is included in SKsh (Amgia PD version of unix's ksh), however, it
does not allow 'tail -f'...  To me it seems almost impossible to
implement this on the Amiga without the cooperation of the program
writing to the file.

Mike

-- 
-------------------------------------------------------------------------
-        Michael D. Fischer       |   greendog@max.physics.sunysb.edu   -
-      S.U.N.Y. at Stony Brook    |   mfische@csserv1.ic.sunysb.edu     -
-------------------------------------------------------------------------

rob@spirits.ka.sub.org (Roland Bless) (01/24/91)

In article <1991Jan17.034047.18447@eecs.wsu.edu>, Roger Nelson - Grad Student writes:

> Does there exist a UNIX like tail utility?

Yes, I've written one and I'll put it on ab20.larc.nasa.gov for anon-FTP.

| usage: tail [+|-[n][lbc]] [file]
| All options enclosed in braces are optional!
|
| + -begin output at line n (display all lines after the first [n-1] lines).
| - -display last [n] lines/blocks/chars (DEFAULT)
| n -number of lines (DEFAULT is 10), blocks or characters
| l -lines  (DEFAULT)
| b -blocks (512 bytes/chars)
| c -chars  (characters)
| file - filename of the file you want to display (very quick)
|
| If you want to display the end of a file, type: "tail filename" and "tail"
| will display the last ten lines of "filename". This will happen very fast,
| because "tail" uses direct filepointer- positioning (if not reading from
| standard- input[1] or pipe) and jumps directly to the end of a file.

 Roland

--
R o l a n d   B l e s s |UUCP/Internet: rob@spirits.ka.sub.org              |
Kriegsstrasse 129       |BITNET: UKG5@DKAUNI2.BITNET      FAX: +49211623818 |
7500 Karlsruhe - FRG    |---------spirits--in--the--material--world---------|
voice +49 721 857328    |"They built machines that they can't control" STING|
--
R o l a n d   B l e s s |UUCP/Internet: rob@spirits.ka.sub.org              |
Kriegsstrasse 129       |BITNET: UKG5@DKAUNI2.BITNET      FAX: +49211623818 |
7500 Karlsruhe - FRG    |---------spirits--in--the--material--world---------|
voice +49 721 857328    |"They built machines that they can't control" STING|