Rename to write-quote.ps1 and speak-quote.ps1

This commit is contained in:
Markus Fleschutz
2021-08-08 11:02:12 +02:00
parent b1b52dc03a
commit af119fc7db
9 changed files with 66 additions and 112 deletions

View File

@ -14,11 +14,12 @@
try {
$Table = import-csv "$PSScriptRoot/../Data/jokes.csv"
$NumRows = $Table.count
$Generator = New-Object System.Random
$Index = [int]$Generator.next(0,66)
$Index = [int]$Generator.next(0,$NumRows - 1)
$Joke = $Table[$Index].Joke
"📣 $Joke"
exit 0
} catch {