Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I just wrote this little batch script. It isn't as sophisticated as the unix "tail" but hopefully someone can add on to it to improve it, like limiting the output to the last 10 lines of the file, etc. If you do improve this script, please send it to me at robbing ~[at]~ gmail.com.</p> <pre><code>@echo off :: This is a batch script I wrote to mimic the 'tail' UNIX command. :: It is far from perfect, but I am posting it in the hopes that it will :: be improved by other people. This was designed to work on Windows 7. :: I have not tested it on any other versions of Windows if "%1" == "" goto noarg if "%1" == "/?" goto help if "%1" == "-?" goto help if NOT EXIST %1 goto notfound set taildelay=%2 if "%taildelay%"=="" set taildelay=1 :loop cls type %1 :: I use the CHOICE command to create a delay in batch. CHOICE /C YN /D Y /N /T %taildelay% goto loop :: Error handlers :noarg echo No arguments given. Try /? for help. goto die :notfound echo The file '%1' could not be found. goto die :: Help text :help echo TAIL filename [seconds] :: I use the call more pipe as a way to insert blank lines since echo. doesnt :: seem to work on Windows 7 call | more echo Description: echo This is a Windows version of the UNIX 'tail' command. echo Written completely from scratch by Andrey G. call | more echo Parameters: echo filename The name of the file to display call | more echo [seconds] The number of seconds to delay before reloading the echo file and displaying it again. Default is set to 1 call | more echo ú /? Displays this help message call | more echo NOTE: echo To exit while TAIL is running, press CTRL+C. call | more echo Example: echo TAIL foo 5 call | more echo Will display the contents of the file 'foo', echo refreshing every 5 seconds. call | more :: This is the end :die </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload