You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: _episodes/05-scripts.md
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -53,9 +53,9 @@ drwxr-xr-x. 2 jeff jeff 18 Jan 25 13:53 fastq
53
53
That's a huge amount of output. Let's see if we can understand what it is, working left to right.
54
54
55
55
+**1st column - Permissions:** On the very left side, there is a string of the characters `d`, `r`, `w`, `x`, and `-`. The `d` simply indicates if something is a directory (there is a `-` in that spot if it is not a directory). The other `r`, `w`, `x` bits indicates permission to **R**ead **W**rite and e**X**ecute a file.**** There are three columns of `rwx` permissions following the spot for `d`. If a user is missing a permission to do something, it's indicated by a `-`.
56
-
+ The first column of `rwx` are the permissions that the owner has (the owner is indicated by jeff in the next column).
57
-
+ The second set of `rwx`s are permissions that other members of the owner's group share (indicated by jeff).
58
-
+ The third set of `rwx`s are permissions that anyone else with access to this computer can do with a file.
56
+
+ The first column of `rwx` are the permissions that the owner has (in this case the owner is `jeff`).
57
+
+ The second set of `rwx`s are permissions that other members of the owner's group share (in this case, the group is also named `jeff`).
58
+
+ The third set of `rwx`s are permissions that anyone else with access to this computer can do with a file. Though files are typically created with read permissions for everyone, typically the permissions on your home directory prevent others from being able to access the file in the first place.
59
59
60
60
+**2nd column - Owner:** This is the username of the user who owns the file. Their permissions are indicated in the first permissions column.
61
61
@@ -203,7 +203,7 @@ total 214132 -rwxr-xr-x. 1 jeff jeff 57 Feb 1 12:20 demo.sh -rw-r-----. 1 jeff j
203
203
```
204
204
{: .output}
205
205
206
-
Note that everything got printed on the same line. This is a feature, not a bug, as it allows us to use $(commands) inside lines of script without triggering line breaks (which would end our line of code and execute it prematurely).
206
+
Note that everything got printed on the same line. This is a feature, not a bug, as it allows us to use `$(commands)` inside lines of script without triggering line breaks (which would end our line of code and execute it prematurely).
207
207
208
208
## Loops
209
209
@@ -284,13 +284,15 @@ fb_synonym_fb_2016_01.tsv
284
284
> ## Concatenating variables
285
285
> Concatenating (i.e. mashing together) variables is quite easy to do. Simply add whatever you want to concatenate to the beginning or end of the shell variable after enclosing it in `{}` characters.
286
286
>
287
-
> ```{.bash}
287
+
> ```
288
288
> FILE=stuff.txt
289
289
> echo ${FILE}.processed
290
290
> ```
291
-
> ```{.output}
291
+
> {: .bash}
292
+
> ```
292
293
> stuff.txt.processed
293
294
> ```
295
+
> {: .output}
294
296
>
295
297
> Can you write a script that prints off the name of every file in a directory with ".example" added to it?
0 commit comments