mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 21:59:11 +02:00
Rename to write-clock.ps1
This commit is contained in:
29
Scripts/write-clock.ps1
Executable file
29
Scripts/write-clock.ps1
Executable file
@ -0,0 +1,29 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Writes an ASCII clock
|
||||
.DESCRIPTION
|
||||
This PowerShell script writes the current time as ACSII clock
|
||||
.EXAMPLE
|
||||
PS> ./write-clock
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
for ([int]$i = 0; $i -lt 99999; $i++) {
|
||||
Clear-Host
|
||||
Write-Output ""
|
||||
$Date = Get-Date -format "yyyy-MM-dd"
|
||||
$Time = Get-Date -format "HH:mm:ss"
|
||||
& "$PSScriptRoot/write-big.ps1" $Date
|
||||
& "$PSScriptRoot/write-big.ps1" $Time
|
||||
Write-Output ""
|
||||
Start-Sleep -seconds 1
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Reference in New Issue
Block a user