mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-14 14:58:47 +02:00
Improved write-progress-bar.ps1
This commit is contained in:
@ -1,8 +1,7 @@
|
|||||||
$progressBar = @('⣾','⣽','⣻','⢿','⡿','⣟','⣯','⣷')
|
$progressBar = @('⣾','⣽','⣻','⢿','⡿','⣟','⣯','⣷')
|
||||||
$progressIndex = 0
|
|
||||||
|
|
||||||
do {
|
for ([int]$i = 0; $i -lt 150; $i++) {
|
||||||
Write-Host "`r$($progressBar[$progressIndex]) Working on something..." -NoNewline
|
Write-Host "`r$($progressBar[$i % 7]) Working on something..." -NoNewline
|
||||||
$progressIndex = ($progressIndex + 1) % $progressBar.Length
|
|
||||||
Start-Sleep -milliseconds 100
|
Start-Sleep -milliseconds 100
|
||||||
} while ($true)
|
}
|
||||||
|
exit 0 # success
|
||||||
|
Reference in New Issue
Block a user