Skip to content

Commit 6807b96

Browse files
committed
fix bash highlighter declarations
1 parent 4b65e98 commit 6807b96

5 files changed

+101
-101
lines changed

_episodes/02-navigating-the-filesystem.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Let's type `pwd` and press enter to execute the command
3232
~~~
3333
$ pwd
3434
~~~
35-
{: .bash}
35+
{: .language-bash}
3636
~~~
3737
/Users/riley
3838
~~~
@@ -44,7 +44,7 @@ by looking at the contents of the directory. To do that, we use the `ls` command
4444
~~~
4545
$ ls
4646
~~~
47-
{: .bash}
47+
{: .language-bash}
4848
~~~
4949
Applications Documents Library Music Public
5050
Desktop Downloads Movies Pictures
@@ -63,7 +63,7 @@ the size of the files in bytes, the date it was created or last modified, and th
6363
~~~
6464
$ ls -l
6565
~~~
66-
{: .bash}
66+
{: .language-bash}
6767
~~~
6868
total 0
6969
drwx------+ 6 riley staff 204 Jul 16 11:50 Desktop
@@ -89,7 +89,7 @@ enter we receive an output in a human-readable format (note: the order here does
8989
~~~
9090
$ ls -lh
9191
~~~
92-
{: .bash}
92+
{: .language-bash}
9393
~~~
9494
total 0
9595
drwx------+ 6 riley staff 204B Jul 16 11:50 Desktop
@@ -111,15 +111,15 @@ On Linux it does.)
111111
~~~
112112
$ cd Desktop
113113
~~~
114-
{: .bash}
114+
{: .language-bash}
115115

116116
Notice that the command didn't output anything. This means that it was carried
117117
out successfully. Let's check by using `pwd`:
118118

119119
~~~
120120
$ pwd
121121
~~~
122-
{: .bash}
122+
{: .language-bash}
123123
~~~
124124
/Users/riley/Desktop
125125
~~~
@@ -131,7 +131,7 @@ test that by trying to move into a non-existent directory:
131131
~~~
132132
$ cd "things to learn about the shell"
133133
~~~
134-
{: .bash}
134+
{: .language-bash}
135135
~~~
136136
bash: cd: things to learn about the shell: No such file or directory
137137
~~~
@@ -187,7 +187,7 @@ As we become more comfortable, we can get very quickly to the directory that we
187187
> >~~~
188188
> >$ man ls
189189
> >~~~
190-
> >{: .bash}
190+
> >{: .language-bash}
191191
> >~~~
192192
> >LS(1) BSD General Commands Manual LS(1)
193193
> >
@@ -250,7 +250,7 @@ As we become more comfortable, we can get very quickly to the directory that we
250250
> > ~~~
251251
> > ls -lS
252252
> > ~~~
253-
> > {: .bash}
253+
> > {: .language-bash}
254254
> >
255255
> > Note that the `S` is **case-sensitive!**
256256
> >
@@ -259,6 +259,6 @@ As we become more comfortable, we can get very quickly to the directory that we
259259
> > ~~~
260260
> > ls -lt
261261
> > ~~~
262-
> > {: .bash}
262+
> > {: .language-bash}
263263
> {: .solution}
264264
{: .challenge}

_episodes/03-working-with-files-and-folders.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ to view your options is useful to orient oneself.
2929
~~~
3030
$ ls
3131
~~~
32-
{: .bash}
32+
{: .language-bash}
3333
~~~
3434
Applications Documents Library Music Public
3535
Desktop Downloads Movies Pictures
@@ -44,7 +44,7 @@ $ cd
4444
$ cd Desktop/shell-lesson
4545
$ pwd
4646
~~~
47-
{: .bash}
47+
{: .language-bash}
4848
~~~
4949
/Users/riley/Desktop/shell-lesson
5050
~~~
@@ -56,7 +56,7 @@ Here, we will create a new directory and move into it:
5656
$ mkdir firstdir
5757
$ cd firstdir
5858
~~~
59-
{: .bash}
59+
{: .language-bash}
6060

6161
Here we used the `mkdir` command (meaning 'make directories') to create a directory
6262
named 'firstdir'. Then we moved into that directory using the `cd` command.
@@ -66,7 +66,7 @@ But wait! There's a trick to make things a bit quicker. Let's go up one director
6666
~~~
6767
$ cd ..
6868
~~~
69-
{: .bash}
69+
{: .language-bash}
7070

7171
Instead of typing `cd firstdir`, let's try to type `cd f` and then press the Tab key.
7272
We notice that the shell completes the line to `cd firstdir/`.
@@ -91,7 +91,7 @@ cover later.
9191
~~~
9292
$ ls -lh
9393
~~~
94-
{: .bash}
94+
{: .language-bash}
9595
~~~
9696
total 33M
9797
-rw-rw-r-- 1 riley staff 383K Feb 22 2017 201403160_01_text.json
@@ -113,7 +113,7 @@ we try the `cat` command to read the text of the first file:
113113
~~~
114114
$ cat 829-0.txt
115115
~~~
116-
{: .bash}
116+
{: .language-bash}
117117

118118
The terminal window erupts and the whole book cascades by (it is printed to
119119
your terminal), leaving us with a new prompt and the last few lines of the book
@@ -126,7 +126,7 @@ provides us with the commands `head` and `tail`.
126126
~~~
127127
$ head 829-0.txt
128128
~~~
129-
{: .bash}
129+
{: .language-bash}
130130
~~~
131131
The Project Gutenberg eBook, Gulliver's Travels, by Jonathan Swift
132132
@@ -144,7 +144,7 @@ whereas `tail 829-0.txt` provides a perspective on the last ten lines:
144144
~~~
145145
$ tail 829-0.txt
146146
~~~
147-
{: .bash}
147+
{: .language-bash}
148148
~~~
149149
Most people start at our Web site which has the main PG search facility:
150150
@@ -168,7 +168,7 @@ next screen and so on, then `q` to quit (return to the command prompt).
168168
~~~
169169
$ less 829-0.txt
170170
~~~
171-
{: .bash}
171+
{: .language-bash}
172172

173173
Like many other shell commands, the commands `cat`, `head`, `tail` and `less`
174174
can take any number of arguments (they can work with any number of files).
@@ -190,7 +190,7 @@ get `33504-0.txt`), to produce the following command:
190190
~~~
191191
$ head 829-0.txt 33504-0.txt
192192
~~~
193-
{: .bash}
193+
{: .language-bash}
194194
~~~
195195
==> 829-0.txt <==
196196
The Project Gutenberg eBook, Gulliver's Travels, by Jonathan Swift
@@ -227,7 +227,7 @@ command in a more compact way:
227227
~~~
228228
$ head *.txt
229229
~~~
230-
{: .bash}
230+
{: .language-bash}
231231

232232
> ## More on wildcards
233233
> Wildcards are a feature of the shell and will therefore work with *any* command.
@@ -251,7 +251,7 @@ argument:
251251
~~~
252252
$ mv 829-0.txt gulliver.txt
253253
~~~
254-
{: .bash}
254+
{: .language-bash}
255255

256256
This is equivalent to the 'rename file' function.
257257

@@ -260,7 +260,7 @@ Afterwards, when we perform a `ls` command, we will see that it is now called `g
260260
~~~
261261
$ ls
262262
~~~
263-
{: .bash}
263+
{: .language-bash}
264264
~~~
265265
2014-01-31_JA-africa.tsv 2014-02-02_JA-britain.tsv gulliver.txt
266266
2014-01-31_JA-america.tsv 33504-0.txt
@@ -280,7 +280,7 @@ $ ls
280280
> > ~~~
281281
> > cp gulliver.txt gulliver-backup.txt
282282
> > ~~~
283-
> > {: .bash}
283+
> > {: .language-bash}
284284
> {: .solution}
285285
{: .challenge}
286286
@@ -293,7 +293,7 @@ $ ls
293293
> > ~~~
294294
> > mv firstdir backup
295295
> > ~~~
296-
> > {: .bash}
296+
> > {: .language-bash}
297297
> {: .solution}
298298
{: .challenge}
299299
@@ -308,14 +308,14 @@ $ ls
308308
> > ~~~
309309
> > mv gulliver-backup.txt backup
310310
> > ~~~
311-
> > {: .bash}
311+
> > {: .language-bash}
312312
> >
313313
> > This would also work:
314314
> >
315315
> > ~~~
316316
> > mv gulliver-backup.txt backup/gulliver-backup.txt
317317
> > ~~~
318-
> > {: .bash}
318+
> > {: .language-bash}
319319
> {: .solution}
320320
{: .challenge}
321321

_episodes/04-loops.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $ for filename in ?.txt
5151
> cp "$filename" backup_"$filename"
5252
> done
5353
~~~
54-
{: .bash}
54+
{: .language-bash}
5555

5656
~~~
5757
a.txt
@@ -136,7 +136,7 @@ The shell itself doesn't care what the variable is called.
136136
> ____ __ _ _______
137137
> ____
138138
> ```
139-
> {: .bash}
139+
> {: .language-bash}
140140
>
141141
> > ## Solution
142142
> > ```
@@ -147,7 +147,7 @@ The shell itself doesn't care what the variable is called.
147147
> > tail -n 1 "$file"
148148
> > done
149149
> > ```
150-
> > {: .bash}
150+
> > {: .language-bash}
151151
> {: .solution}
152152
{: .challenge}
153153
@@ -179,6 +179,6 @@ This is our first look at loops. We will run another loop in the
179179
> > tail -n 1 $file
180180
> > done
181181
> > ```
182-
> > {: .bash}
182+
> > {: .language-bash}
183183
> Download/copy [my_first_bash_script.sh](https://raw.githubusercontent.com/LibraryCarpentry/lc-shell/gh-pages/files/my_first_bash_script.sh). For more on Bash scripts, see [Bash Scripting Tutorial - Ryans Tutorials](https://ryanstutorials.net/bash-scripting-tutorial/).
184184
{: .callout}

0 commit comments

Comments
 (0)