Search
 
SCRIPT & CODE EXAMPLE
 

BASIC

how to simulate tail in dos/cmd without tail

REM tail.bat
REM
REM Usage: tail.bat <file> <number-of-lines> 
REM
REM Examples: tail.bat myfile.txt 10
REM           tail.bat "C:My FileWithSpaces.txt" 10

@ECHO OFF
for /f "tokens=2-3 delims=:" %%f in ('find /c /v "" %1') do (
    for %%F in (%%f %%g) do set nbLines=%%F )
set /a nbSkippedLines=%nbLines%-%2
for /f "usebackq skip=%nbSkippedLines% delims=" %%d in (%1) do echo %%d
Comment

PREVIOUS NEXT
Code Example
Basic :: visual basic excel freeze first row 
Basic :: shortcut to rename the file on lenovo s340 
Elixir :: elixir string to time 
Elixir :: elixir catch 
Elixir :: elixir enum map 
Elixir :: elixir list map key string to atom 
Elixir :: elixir append lists 
Elixir :: elixir anonymous function 
Elixir :: liveview component update 
Scala :: scala list get element 
Scala :: How to make immutable variable in scala 
Scala :: scala home set up 
Actionscript :: reset udemy course 
Actionscript :: silk road block-cypher 
Excel :: google sheets if 
Excel :: google sheets refer to another sheet in conditional formatting 
Perl :: perl mongodb conf location 
Pascal :: pascal read 
Pascal :: case of pascal 
Powershell :: powershell show which diorecty is temp 
Clojure :: clojure def 
Erlang :: erlang exit from shell 
Assembly :: how to import servo library in arduino 
Assembly :: dd utility seek 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: jquery remove required attribute 
Javascript :: react refresh page 
Javascript :: javascript void(0) href 
Javascript :: get tomorrows date using moment 
Javascript :: random number between 0 and 3 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =