Bash PowerShell Rosetta Stone

DescriptionBashPowerShell
Output “test” to a fileecho “test” > test.txt“test” | Out-File test.txt
Store the output of file test.txt in the variable “file”file=$(cat test.txt)$file=Get-Content test.txt
Upper-case the contents of a variablevariable=$(echo $variable) | tr a-z A-Z$variable=$variable.ToUpper()
Store the contents of standard input into a variableread -p ‘Input a value: ‘ variable$variable=Read-Host “Input a value:”