Added matrix-effect.ps1

This commit is contained in:
Markus Fleschutz 2020-12-14 15:08:42 +00:00
parent 3c5eb24744
commit 4c9a6b2390
3 changed files with 57 additions and 0 deletions

21
Data/Matrix.csv Normal file
View File

@ -0,0 +1,21 @@
A,B,C,D,E,F,G
" ","P"," "," "," "," ","H"
" ","O"," "," "," "," ","A"
" ","W"," "," "," "," ","V"
" ","E"," "," "," "," ","E"
" ","R"," "," "," "," "," "
" ","S"," "," "," "," ","F"
" ","H"," "," "," "," ","U"
" ","E"," "," "," "," ","N"
" ","L"," "," "," "," "," "
" ","L"," "," "," "," "," "
" "," "," "," "," "," "," "
" ","R"," "," "," "," "," "
" ","U"," "," "," "," "," "
" ","L"," "," "," "," "," "
" ","E"," "," "," "," "," "
" ","S"," "," "," "," "," "
" "," "," "," "," "," "," "
" "," "," "," "," "," "," "
" "," "," "," "," "," "," "
" "," "," "," "," "," "," "
1 A B C D E F G
2 P H
3 O A
4 W V
5 E E
6 R
7 S F
8 H U
9 E N
10 L
11 L
12
13 R
14 U
15 L
16 E
17 S
18
19
20
21

View File

@ -23,6 +23,7 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
* [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - locates the geographic position of the given IP address
* [MD5.ps1](Scripts/MD5.ps1) - prints the MD5 checksum of the given file
* [make-install.ps1](Scripts/make-install.ps1) - installs built executables and libs to the installation directory
* [matrix-effect.ps1](Scripts/matrix-effect.ps1) - shows the Matrix effect
* [moon.ps1](Scripts/moon.ps1) - prints the current moon phase
* [open-browser.ps1](Scripts/open-browser.ps1) - starts the default Web browser
* [open-email-client.ps1](Scripts/open-browser.ps1) - starts the default email client

35
Scripts/matrix-effect.ps1 Executable file
View File

@ -0,0 +1,35 @@
#!/snap/bin/powershell
# Syntax: ./matrix-effect.ps1
# Description: shows the Matrix effect
# Author: Markus Fleschutz
# Source: github.com/fleschutz/PowerShell
# License: CC0
try {
$PathToData=(get-item $MyInvocation.MyCommand.Path).directory
$PathToData="$PathToData/../Data"
$Table = import-csv "$PathToData/Matrix.csv"
Clear-Host
foreach($Row in $Table) {
Write-Host -nonewline $($Row.A)
Start-Sleep -milliseconds 10
Write-Host -nonewline $($Row.B)
Start-Sleep -milliseconds 10
Write-Host -nonewline $($Row.C)
Start-Sleep -milliseconds 10
Write-Host -nonewline $($Row.D)
Start-Sleep -milliseconds 10
Write-Host -nonewline $($Row.E)
Start-Sleep -milliseconds 10
Write-Host -nonewline $($Row.F)
Start-Sleep -milliseconds 10
Write-Host $($Row.G)
Start-Sleep -milliseconds 200
}
exit 0
} catch {
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}