diff --git a/manuscript/chapter1.txt b/manuscript/chapter1.txt index 1f76b0c..157ae20 100644 --- a/manuscript/chapter1.txt +++ b/manuscript/chapter1.txt @@ -61,7 +61,7 @@ John Black is my name. ## Use regex on a string -We can use the result of `bash`'s regex matching to replace `sed` for a +The result of `bash`'s regex matching can be used to replace `sed` for a large number of use-cases. **CAVEAT**: This is one of the few platform dependant `bash` features. diff --git a/manuscript/chapter16.txt b/manuscript/chapter16.txt index 3aad5d6..72b3881 100644 --- a/manuscript/chapter16.txt +++ b/manuscript/chapter16.txt @@ -113,10 +113,7 @@ f()for i in "$@"; do echo "$i"; done ## Simpler `case` statement to set variable -We can use the `:` builtin to avoid repeating `variable=` in a case -statement. The `$_` variable stores the last argument of the last -successful command. `:` always succeeds so we can abuse it to store the -variable value. +The `:` built-in can be used to avoid repeating `variable=` in a case statement. The `$_` variable stores the last argument of the last command. `:` always succeeds so it can be used to store the variable value. ```shell # Modified snippet from Neofetch. diff --git a/manuscript/chapter17.txt b/manuscript/chapter17.txt index 8f5f2ee..f575993 100644 --- a/manuscript/chapter17.txt +++ b/manuscript/chapter17.txt @@ -51,8 +51,7 @@ fi ## Get the current date using `strftime` -Bash’s `printf` has a built-in method of getting the date which we can use -in place of the `date` command in a lot of cases. +Bash’s `printf` has a built-in method of getting the date which can be used in place of the `date` command. **CAVEAT:** Requires `bash` 4+ diff --git a/manuscript/chapter4.txt b/manuscript/chapter4.txt index 079c060..d2a397b 100644 --- a/manuscript/chapter4.txt +++ b/manuscript/chapter4.txt @@ -117,8 +117,7 @@ $ lines_loop ~/.bashrc ## Count files or directories in directory -This works by passing the output of the glob as function arguments. We -then count the arguments and print the number. +This works by passing the output of the glob to the function and then counting the number of arguments. **Example Function:**