mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-20 00:48:17 +02:00
Update write-joke.ps1
This commit is contained in:
parent
ff545d827e
commit
622132503d
@ -2,9 +2,10 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-joke.ps1
|
write-joke.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes a random Juck Norris joke to the console
|
Writes a random Juck Norris joke to the console.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./write-joke
|
PS> ./write-joke
|
||||||
|
When Chuck Norris does division, there are no remainders. 😂
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
@ -19,7 +20,7 @@ try {
|
|||||||
$Index = [int]$Generator.next(0,$NumRows - 1)
|
$Index = [int]$Generator.next(0,$NumRows - 1)
|
||||||
$Joke = $Table[$Index].Joke
|
$Joke = $Table[$Index].Joke
|
||||||
|
|
||||||
"📣 $Joke"
|
"$Joke 😂"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
Reference in New Issue
Block a user