Skip to content

Commit c22c98c

Browse files
committed
Add remove of created files and cut cat example
1 parent 54a74c6 commit c22c98c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

notes/unix_outline.org

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ This command can also be used to *concatenate* or join multiple files
155155
together.
156156

157157
#+BEGIN_SRC sh
158-
cat ../README.md ../README.md
158+
cat ../src/Makefile ../src/Makefile
159159
#+END_SRC
160160

161161
#+RESULTS:
@@ -617,7 +617,7 @@ especially those organized into rows and columns i.e. tabular data.
617617
Borrowed from [[https://dev.to/rrampage/awk---a-useful-little-language-2fhf][Raunak Ramakrishnan]], their blog post has broken down how ~awk~
618618
works in terms of Python pseudocode.
619619

620-
#+BEGIN_SRC python
620+
#+BEGIN_SRC python :eval no
621621
initialize() # Initializes variables in BEGIN block
622622
for line in input_lines: # Divides input into a list of lines
623623
for condition, action in conditions: # Just list of condition-action pairs
@@ -1027,8 +1027,6 @@ type of loop, however, loops over a list of items until that list is done.
10271027
4
10281028
:END:
10291029

1030-
1031-
10321030
** Exit Status Indicators for Scripts
10331031

10341032
Unix and Linux systems have what are called *exit codes* that scripts/programs
@@ -1421,6 +1419,17 @@ Makefile that does a very similar task and then change it to fit your needs.
14211419
| tmux | Terminal multiplexer |
14221420
| make | Bash scripting automation |
14231421

1422+
#+BEGIN_SRC sh :results output silent :exports code
1423+
rm -f count_lines.sh \
1424+
list_of_files.txt \
1425+
pep* \
1426+
restricted_file.txt \
1427+
test_exit_codes.sh \
1428+
test_file.txt \
1429+
zen.txt \
1430+
new_file_1.txt
1431+
#+END_SRC
1432+
14241433
* Exercises
14251434

14261435
** Exercise 1 Basic Pipelines

0 commit comments

Comments
 (0)