Request - "tail/top" plugin
Posted: May 31st, 2007, 6:02 am
Those of you familiar with *nix systems likely know the nifty command "tail". It shows you the last line (or last few lines, depending on the arguments) of a file. "top" is the same, only it does the same thing from the beginning of the file. I'd really like to see a plugin that does something similar!
My idea for the plugin would have two functions; function 0 for taking lines from the top of the file and 1 for taking lines form the bottom. The two arguments would then be the file name and the number of lines in to read from. So, for instance...
$dll(toptail.dll,1,c:\somelogfile.txt,0)
$dll(toptail.dll,1,c:\somelogfile.txt,1)
... would return the last two lines of c:\somelogfile.txt, in reverse order on the two lines of the display.
Now all this talk is nice, but I have no programming skills with which to put this into action. Anyone up for this one?
Thanks in advance!
My idea for the plugin would have two functions; function 0 for taking lines from the top of the file and 1 for taking lines form the bottom. The two arguments would then be the file name and the number of lines in to read from. So, for instance...
$dll(toptail.dll,1,c:\somelogfile.txt,0)
$dll(toptail.dll,1,c:\somelogfile.txt,1)
... would return the last two lines of c:\somelogfile.txt, in reverse order on the two lines of the display.
Now all this talk is nice, but I have no programming skills with which to put this into action. Anyone up for this one?
Thanks in advance!