Add write-lowercase.ps1

This commit is contained in:
Markus Fleschutz 2021-04-14 14:10:43 +02:00
parent 2e5ee3f7eb
commit 392bfe11f8
4 changed files with 17 additions and 7 deletions

View File

@ -172,6 +172,7 @@ write-blue.ps1, writes the given text in a blue foreground color
write-braille.ps1, writes the given text in Braille
write-green.ps1, writes the given text in a green foreground color
write-logbook.ps1, writes the given text to the logbook
write-lowercase.ps1, writes the given text in lowercase letters
write-marquee.ps1, writes the given text as marquee
write-morse-code.ps1, writes the given text in Morse code
write-motd.ps1, writes the message of the day (MOTD)

Can't render this file because it has a wrong number of fields in line 168.

View File

@ -197,6 +197,7 @@ Mega Collection of PowerShell Scripts
* [write-braille.ps1](Scripts/write-braille.ps1) - writes the given text in Braille
* [write-green.ps1](Scripts/write-green.ps1) - writes the given text in a green foreground color
* [write-logbook.ps1](Scripts/write-logbook.ps1) - writes the given text to the logbook
* [write-lowercase.ps1](Scripts/write-lowercase.ps1) - writes the given text in lowercase letters
* [write-marquee.ps1](Scripts/write-marquee.ps1) - writes the given text as marquee
* [write-morse-code.ps1](Scripts/write-morse-code.ps1) - writes the given text in Morse code
* [write-motd.ps1](Scripts/write-motd.ps1) - writes the message of the day (MOTD)

13
Scripts/write-lowercase.ps1 Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/pwsh
<#
.SYNTAX write-lowercase.ps1 [<text>]
.DESCRIPTION writes the given text in lowercase letters
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
param($Text = "")
if ($Text -eq "" ) { $Text = read-host "Enter the text to write" }
write-output $Text.ToLower()
exit 0

View File

@ -9,10 +9,5 @@
param($Text = "")
if ($Text -eq "" ) { $Text = read-host "Enter the text to write" }
try {
write-output $Text.ToUpper()
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
write-output $Text.ToUpper()
exit 0