2.5 KiB
2.5 KiB
lesson 02 | course overview + the shell
Notes
bash
spaces are critical with bash
- this works:
foo=bar
echo $foo
- this doesn't:
foo = bar
echo $foo
the output of that will be
zsh: command not found: foo
- what happens in the above example is that we are effectively calling the "foo" program with the arguments: "=" and "bar"
quotes
-
you can use double or single quotes to print a value
echo "Hello"echo 'Hello' -
double quotes can interpolate variables
echo "Value is $foo"will return:
Value is bar -
single quotes can NOT interpoloate variables
echo 'Value is $foo'will return:
Value is $foo