Added more play* scripts

This commit is contained in:
Markus Fleschutz
2021-02-16 19:43:46 +01:00
parent ba6dedd798
commit 0c51ca75e3
8 changed files with 127 additions and 11 deletions

View File

@ -12,9 +12,9 @@ try {
if ($DirTree -eq "" ) {
$DirTree = read-host "Enter the path to the directory tree"
}
write-progress "Listing empty files in $DirTree ..."
[int]$Count = 0
Get-ChildItem $DirTree -recurse | Where {$_.PSIsContainer -eq $false} | Where {$_.Length -eq 0} | ForEach-Object {
write-progress "Listing empty files in $DirTree ..."
get-childItem $DirTree -recurse | where {$_.PSIsContainer -eq $false} | where {$_.Length -eq 0} | foreach-object {
write-output $_.FullName
$Count++
}

View File

@ -6,10 +6,5 @@
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
[console]::beep(500,300)
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
[console]::beep(500,300)
exit 0

View File

@ -0,0 +1,55 @@
#!/bin/powershell
<#
.SYNTAX ./play-mission-impossible.ps1
.DESCRIPTION plays the Mission Impossible theme
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(932,150)
Start-Sleep -m 150
[console]::beep(1047,150)
Start-Sleep -m 150
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(699,150)
Start-Sleep -m 150
[console]::beep(740,150)
Start-Sleep -m 150
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(932,150)
Start-Sleep -m 150
[console]::beep(1047,150)
Start-Sleep -m 150
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(784,150)
Start-Sleep -m 300
[console]::beep(699,150)
Start-Sleep -m 150
[console]::beep(740,150)
Start-Sleep -m 150
[console]::beep(932,150)
[console]::beep(784,150)
[console]::beep(587,1200)
Start-Sleep -m 75
[console]::beep(932,150)
[console]::beep(784,150)
[console]::beep(554,1200)
Start-Sleep -m 75
[console]::beep(932,150)
[console]::beep(784,150)
[console]::beep(523,1200)
Start-Sleep -m 150
[console]::beep(466,150)
[console]::beep(523,150)
exit 0

33
Scripts/play-super-mario.ps1 Executable file
View File

@ -0,0 +1,33 @@
#!/bin/powershell
<#
.SYNTAX ./play-super-mario.ps1
.DESCRIPTION plays the Super Mario Intro
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
[console]::beep(659,250) ##E
[console]::beep(659,250) ##E
[console]::beep(659,300) ##E
[console]::beep(523,250) ##C
[console]::beep(659,250) ##E
[console]::beep(784,300) ##G
[console]::beep(392,300) ##g
[console]::beep(523,275) ## C
[console]::beep(392,275) ##g
[console]::beep(330,275) ##e
[console]::beep(440,250) ##a
[console]::beep(494,250) ##b
[console]::beep(466,275) ##a#
[console]::beep(440,275) ##a
[console]::beep(392,275) ##g
[console]::beep(659,250) ##E
[console]::beep(784,250) ## G
[console]::beep(880,275) ## A
[console]::beep(698,275) ## F
[console]::beep(784,225) ## G
[console]::beep(659,250) ## E
[console]::beep(523,250) ## C
[console]::beep(587,225) ## D
[console]::beep(494,225) ## B
exit 0

View File

@ -0,0 +1,27 @@
#!/bin/powershell
<#
.SYNTAX ./play-the-imperial-march.ps1
.DESCRIPTION plays the Imperial March (Star Wars)
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
[console]::beep(440,500)
[console]::beep(440,500)
[console]::beep(440,500)
[console]::beep(349,350)
[console]::beep(523,150)
[console]::beep(440,500)
[console]::beep(349,350)
[console]::beep(523,150)
[console]::beep(440,1000)
[console]::beep(659,500)
[console]::beep(659,500)
[console]::beep(659,500)
[console]::beep(698,350)
[console]::beep(523,150)
[console]::beep(415,500)
[console]::beep(349,350)
[console]::beep(523,150)
[console]::beep(440,1000)
exit 0

View File

@ -24,7 +24,7 @@ try {
exit 0
}
}
write-error "Sorry, no German text-to-speech (TTS) voice found"
write-error "No German text-to-speech (TTS) voice found"
exit 1
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"