Powershell hr
·1 min
I saw this on reddit (or possibly hackernews) the other day that produces a simple banner line in bash.
So here’s a powershell version:
function hr($txt)
{
$ui = (Get-Host).UI.RawUI
$width = $ui.WindowSize.width
$n = ($width / $txt.Length) -1
$bar = "$txt" * $n
echo $bar
}