Scripting Languages Comparison Flashcards
How do you assign variables in PowerShell?
Only language where its different
$varName=value
How do you display a variable to terminal in Bash?
echo $varName
How do you display a variable to terminal in PowerShell?
Write-Host $varName
How do you display a variable to terminal in Ruby?
puts varName
What are the comparison operators in Bash?
-eq (==), -ne (!=), -lt (), -ge (>=)
What are the comparison operators in PowerShell?
-eq, -ne, -gt, -ge, -lt, -le
What are the comparison operators in Ruby?
==, !=, >, >=,
What are the comparison operators in Python?
==, != (<>), >, >=,
What are the different kinds of loops in Bash?
For
What are the different kinds of loops in PowerShell?
For, While, Do-While, Do-Until
What are the different kinds of loops in Ruby?
while, until, for
What are the different kinds of loops in Python?
for, while
Flow Control in Bash
if condition then commands elif commands else commands fi
Flow Control in PowerShell
if (condition) { statements } elseif (condition) { statements } else { statements }
Flow Control in Ruby
if condition then statements elsif statements else statements end