mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 21:20:51 +01:00
Added display-time.ps1
This commit is contained in:
parent
ff814e7596
commit
c7de666823
@ -13,6 +13,7 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
|
|||||||
* [clone-repos.ps1](Scripts/clone-repos.ps1) - clones well-known Git repositories
|
* [clone-repos.ps1](Scripts/clone-repos.ps1) - clones well-known Git repositories
|
||||||
* [configure-git.ps1](Scripts/configure-git.ps1) - sets up the Git configuration
|
* [configure-git.ps1](Scripts/configure-git.ps1) - sets up the Git configuration
|
||||||
* [csv-to-text.ps1](Scripts/csv-to-text.ps1) - converts the given CSV file into a text list
|
* [csv-to-text.ps1](Scripts/csv-to-text.ps1) - converts the given CSV file into a text list
|
||||||
|
* [display-time.ps1](Scripts/display-time.ps1) - displays the current time
|
||||||
* [download.ps1](Scripts/download.ps1) - downloads the file/directory from the given URL
|
* [download.ps1](Scripts/download.ps1) - downloads the file/directory from the given URL
|
||||||
* [empty-dir.ps1](Scripts/empty-dir.ps1) - empties the given directory
|
* [empty-dir.ps1](Scripts/empty-dir.ps1) - empties the given directory
|
||||||
* [enable-crash-dumps.ps1](Scripts/enable-crash-dumps.ps1) - enables the writing of crash dumps
|
* [enable-crash-dumps.ps1](Scripts/enable-crash-dumps.ps1) - enables the writing of crash dumps
|
||||||
|
22
Scripts/display-time.ps1
Executable file
22
Scripts/display-time.ps1
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/snap/bin/powershell
|
||||||
|
|
||||||
|
# Syntax: ./display-time.ps1
|
||||||
|
# Description: displays the current time
|
||||||
|
# Author: Markus Fleschutz
|
||||||
|
# Source: github.com/fleschutz/PowerShell
|
||||||
|
# License: CC0
|
||||||
|
|
||||||
|
try {
|
||||||
|
for ($i = 0; $i -lt 1000; $i++) {
|
||||||
|
$CurrentTime = Get-Date -format "yyyy-MM-dd HH:mm:ss"
|
||||||
|
clear-host
|
||||||
|
write-output ""
|
||||||
|
./write-big $CurrentTime
|
||||||
|
write-output ""
|
||||||
|
start-sleep -s 1
|
||||||
|
}
|
||||||
|
exit 0
|
||||||
|
} catch {
|
||||||
|
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user