summaryrefslogtreecommitdiffhomepage
path: root/bash.html.markdown
diff options
context:
space:
mode:
authorAdam <adam@adambard.com>2016-10-21 15:35:09 -0700
committerAdam <adam@adambard.com>2016-10-21 15:35:09 -0700
commit620e5d20402be961d27ce6cc6a007204c81391d4 (patch)
treee33427b1aa82c11a8e974ccd8a02b789de4c9737 /bash.html.markdown
parentde376b4357e79fc847e4c1ae2717946fe05d3bef (diff)
parent0659107a78bddd722df816daa01ee622fb4508d1 (diff)
Merge branch 'master' of github.com:adambard/learnxinyminutes-docs
Diffstat (limited to 'bash.html.markdown')
-rw-r--r--bash.html.markdown10
1 files changed, 4 insertions, 6 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index b1a14bdb..271ef62c 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -23,8 +23,6 @@ Nearly all examples below can be a part of a shell script or executed directly i
[Read more here.](http://www.gnu.org/software/bash/manual/bashref.html)
-Another recommened link: [The Command Line Crash Course](http://cli.learncodethehardway.org/book/)
-
```bash
#!/bin/bash
# First line of the script is shebang which tells the system how to execute
@@ -98,10 +96,10 @@ echo "Script's arguments separated into different variables: $1 $2..."
# Now that we know how to echo and use variables,
# let's learn some of the other basics of bash!
-# Getting our current directory is available through the command `pwd`.
+# Our current directory is available through the command `pwd`.
# `pwd` stands for "print working directory".
# We can also use the builtin variable `$PWD`.
-# Observer that the following are equivalent:
+# Observe that the following are equivalent:
echo "I'm in $(pwd)" # execs `pwd` and interpolates output
echo "I'm in $PWD" # interpolates the variable
@@ -353,8 +351,8 @@ fgrep "foobar" file.txt
trap "rm $TEMP_FILE; exit" SIGHUP SIGINT SIGTERM
# `sudo` is used to perform commands as the superuser
-$NAME1=$(whoami)
-$NAME2=$(sudo whoami)
+NAME1=$(whoami)
+NAME2=$(sudo whoami)
echo "Was $NAME1, then became more powerful $NAME2"
# Read Bash shell builtins documentation with the bash 'help' builtin: