diff --git a/powershell/cdarg.ps1 b/powershell/cdarg.ps1 new file mode 100644 index 0000000..40b3543 --- /dev/null +++ b/powershell/cdarg.ps1 @@ -0,0 +1,23 @@ +#!/usr/local/bin/pwsh + +<# REF: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_switch?view=powershell-7.3 #> + +$param1=$args[0] +Write-Output $param1 + +# switch -Regex $(param1) +# 'bincloud|binc' {} + +switch ($param1) +{ + 1 {cd ~/bin/powershell } +# 2 {cd "c:\users\$env:UserName" } +# 3 {cd "c:\users\$env:UserName\Desktop\Docs-local\bin-cloud" } + shr {cd /Volumes/zhgstera6/shrcompr-zhgst6 } + notshr {cd /Volumes/zhgstera6/notshrcompr-zhgst6 } + dvd {cd /Volumes/zhgstera6/dvdrips-shr/MAKEMKV } + + Default { Write-Output "Fallthru, no match" } +} + +Get-Location # pwd \ No newline at end of file diff --git a/powershell/hashtable.ps1 b/powershell/hashtable.ps1 new file mode 100644 index 0000000..87fe9a9 --- /dev/null +++ b/powershell/hashtable.ps1 @@ -0,0 +1,5 @@ +# Powershell +# REF: https://adamtheautomator.com/powershell-hashtable/ + +$name=@{} +