じゃ、PowerShellで。
Function Tail($filepath) { while($true) { Get-Content -path $filepath -Wait } } Tail "c:\temp\test.txt"
改行とかはうまくいかないときもあるが、
まあいい。
Function Tail($filepath) { while($true) { Get-Content -path $filepath -Wait } } Tail "c:\temp\test.txt"
function IsDate([string]$datestr) { $Val = $datestr -as [DateTime] if($Val -eq $null) { $False } else { $type = $Val.GetType().FullName $type -eq "System.DateTime" #return } }
>IsDate "2011-01-21" TRUE >IsDate "1:31" TRUE