diff --git a/03-create.html b/03-create.html index 08ce784fd..688e71980 100644 --- a/03-create.html +++ b/03-create.html @@ -446,7 +446,8 @@
If you need to refer to names of files or directories that have
spaces or other special characters, you should surround the name in
-quotes (""
).
''
).
@@ -566,7 +567,7 @@ The touch
command generates a new file called
my_file.txt
in your current directory. You can observe this
@@ -770,7 +771,7 @@
We start in the /Users/jamie/data
directory, and create
a new folder called recombined
. The second line moves
@@ -1010,7 +1011,7 @@
rm
Safely
If given more than one file name followed by a directory name (i.e. the destination directory must be the last argument), @@ -1182,7 +1183,7 @@
The solution is 3.
1.
shows all files whose names contain zero or more
@@ -1304,7 +1305,7 @@
The first two sets of commands achieve this objective. The first set uses relative paths to create the top-level directory before the diff --git a/04-pipefilter.html b/04-pipefilter.html index 25c3ce57f..ac8ca1af1 100644 --- a/04-pipefilter.html +++ b/04-pipefilter.html @@ -531,7 +531,7 @@
The -n
option specifies a numerical rather than an
alphanumerical sort.
In the first example with >
, the string ‘hello’ is
written to testfile01.txt
, but the file gets overwritten
@@ -697,7 +697,7 @@
Option 3 is correct. For option 1 to be correct we would only run the
head
command. For option 2 to be correct we would only run
@@ -799,7 +799,7 @@
Option 4 is the solution. The pipe character |
is used
to connect the output from one command to the input of another.
@@ -864,7 +864,7 @@
The head
command extracts the first 5 lines from
animals.csv
. Then, the last 3 lines are extracted from the
@@ -928,7 +928,7 @@
Option 4. is the correct answer. If you have difficulty understanding why, try running the commands, or sub-sections of the pipelines (make @@ -1092,7 +1092,7 @@
.txt
files with one-character
namesIf a command causes something to crash or hang, it might be useful to know what that command was, in order to investigate the problem. Were @@ -782,7 +782,7 @@
The correct answer is 2.
The special variables $1
, $2
and
@@ -837,7 +837,7 @@
In each case, the shell expands the wildcard in *.pdb
before passing the resulting list of file names as arguments to the
@@ -976,7 +976,7 @@
The -x
option causes bash
to run in debug
mode. This prints out each command as it is run, which will help you to
diff --git a/07-find.html b/07-find.html
index 1b0ddae19..f9b83ae11 100644
--- a/07-find.html
+++ b/07-find.html
@@ -550,7 +550,7 @@
The correct answer is 3, because the -w
option looks
only for whole-word matches. The other options will also match ‘of’ when
@@ -649,7 +649,7 @@
grep -w $1 -r $2 | cut -d : -f 2 | cut -d , -f 1,3 > $1.txt
Actually, you can swap the order of the two cut commands and it still @@ -697,7 +697,7 @@
for sis in Jo Meg Beth Amy
do
@@ -964,7 +964,7 @@ Matching and Subtracting
Show me the solution
-
+
Option 1 is correct. Putting the match expression in quotes prevents
the shell expanding it, so it gets passed to the find
@@ -1040,7 +1040,7 @@
BASH
Show me the solution
-
+
- Find all files with a
.dat
extension recursively from
the current directory
diff --git a/aio.html b/aio.html
index 2c37b835a..f1079feb9 100644
--- a/aio.html
+++ b/aio.html
@@ -1775,7 +1775,8 @@ Good names f
even result in data loss.
If you need to refer to names of files or directories that have
spaces or other special characters, you should surround the name in
-quotes (""
).
+single quotes
+(''
).
@@ -1902,7 +1903,7 @@ BASH
Show me the solution
-
+
The touch
command generates a new file called
@@ -2110,7 +2111,7 @@
BASH
Show me the solution
-
+
BASH
@@ -2204,7 +2205,7 @@ Renaming Files
Show me the solution
-
+
- No. While this would create a file with the correct name, the
@@ -2272,7 +2273,7 @@
BASH
Show me the solution
-
+
We start in the /Users/jamie/data
directory, and create
a new folder called recombined
. The second line moves
@@ -2361,7 +2362,7 @@
Usingrm
Safely
Show me the solution
-
+
OUTPUT
@@ -2455,7 +2456,7 @@ BASH
Show me the solution
-
+
If given more than one file name followed by a directory name
(i.e. the destination directory must be the last argument),
@@ -2538,7 +2539,7 @@
List filenames matching a pattern
Show me the solution
-
+
The solution is 3.
1.
shows all files whose names contain zero or more
@@ -2660,7 +2661,7 @@
BASH
Show me the solution
-
+
BASH
@@ -2725,7 +2726,7 @@ OUTPUT<
-
+
BASH
@@ -2814,7 +2815,7 @@ BASH
Show me the solution
-
+
The first two sets of commands achieve this objective. The first set
uses relative paths to create the top-level directory before the
@@ -3134,7 +3135,7 @@
OUTPUT<
-
+
The -n
option specifies a numerical rather than an
alphanumerical sort.
@@ -3250,7 +3251,7 @@ BASH
Show me the solution
-
+
In the first example with >
, the string ‘hello’ is
written to testfile01.txt
, but the file gets overwritten
@@ -3303,7 +3304,7 @@
BASH
Show me the solution
-
+
Option 3 is correct. For option 1 to be correct we would only run the
head
command. For option 2 to be correct we would only run
@@ -3409,7 +3410,7 @@
Piping Commands Together
Show me the solution
-
+
Option 4 is the solution. The pipe character |
is used
to connect the output from one command to the input of another.
@@ -3475,7 +3476,7 @@
BASH
Show me the solution
-
+
The head
command extracts the first 5 lines from
animals.csv
. Then, the last 3 lines are extracted from the
@@ -3539,7 +3540,7 @@
OUTPUT<
-
+
BASH
@@ -3590,7 +3591,7 @@ OUTPUT<
-
+
Option 4. is the correct answer. If you have difficulty understanding
why, try running the commands, or sub-sections of the pipelines (make
@@ -3708,7 +3709,7 @@
Removing Unneeded Files
Show me the solution
-
+
- This would remove
.txt
files with one-character
@@ -5103,7 +5104,7 @@ List Unique Species
Show me the solution
-
+
BASH
@@ -5171,7 +5172,7 @@ BASH
Show me the solution
-
+