mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-21 15:33:15 +01:00
60 lines
1.2 KiB
Markdown
60 lines
1.2 KiB
Markdown
The *write-sine-curves.ps1* Script
|
|
===========================
|
|
|
|
This PowerShell script writes sine curves.
|
|
|
|
Parameters
|
|
----------
|
|
```powershell
|
|
/home/markus/Repos/PowerShell/scripts/write-sine-curves.ps1 [<CommonParameters>]
|
|
|
|
[<CommonParameters>]
|
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
|
```
|
|
|
|
Example
|
|
-------
|
|
```powershell
|
|
PS> ./write-sine-curves
|
|
|
|
```
|
|
|
|
Notes
|
|
-----
|
|
Author: Markus Fleschutz | License: CC0
|
|
|
|
Related Links
|
|
-------------
|
|
https://github.com/fleschutz/PowerShell
|
|
|
|
Script Content
|
|
--------------
|
|
```powershell
|
|
<#
|
|
.SYNOPSIS
|
|
Write sine curves
|
|
.DESCRIPTION
|
|
This PowerShell script writes sine curves.
|
|
.EXAMPLE
|
|
PS> ./write-sine-curves
|
|
.LINK
|
|
https://github.com/fleschutz/PowerShell
|
|
.NOTES
|
|
Author: Markus Fleschutz | License: CC0
|
|
#>
|
|
|
|
0..1000 | foreach {
|
|
$Value = [int](40 * [math]::sin($_ / 10))
|
|
if ($Value -gt 0) {
|
|
$Line = " "*60+"*"*$value
|
|
} else {
|
|
$Line = " "*(60-(-1*$value))+"*"*($value*-1)
|
|
}
|
|
Write-Host $Line
|
|
Start-Sleep -milliseconds 50
|
|
}
|
|
```
|
|
|
|
*(generated by convert-ps2md.ps1 as of 11/20/2024 11:52:02)*
|