Commit ceaf45c5 authored by nilsl's avatar nilsl
Browse files

fix spelling

parent 7613a131
......@@ -15,9 +15,13 @@ class: center, middle
<img src="images/thealternative-logo.jpg" width="30%">
---
# We will see TODO
<!--
# We will see
...a short **Bash** introduction, to get the necessary intuition for what most tools in this course do.
......@@ -25,8 +29,7 @@ class: center, middle
...a wide spectrum of available **tools** and what you can do with them.
---
-->
# Goals
......@@ -41,7 +44,8 @@ Provide pointers for where to learn the tools.
---
# example: a download filer
<!--
# Example: a download filer
Displays the most recently downloaded file and asks what to do with it
......@@ -62,14 +66,12 @@ Save the above in `/home/nils/filer.sh` and add a few lines of text in `~/.xbind
control+shift+f
```
---
# How to use this talk TODO
- pick and choose the tools that seem interesting to you and try to learn them
- come back to the slides and use them as a glossary for unknown words
---
-->
# Some philosophy before Bash
......@@ -77,7 +79,7 @@ Many of the classical Linux tools adhere to the "UNIX principle":
<blockquote>Do one thing and do it well.</blockquote>
This usually implies that they are built with composability in mind.
This usually implies that they are built with composability in mind.
We like that because it means we learn more things by doing less.
---
......@@ -117,6 +119,8 @@ Most commands take options that modify their default behavior.
<source src="demos/demo1-2021-04-15_23.14.09.mkv.mp4" type="video/mp4">
</video>
---
# Basics: Taking a Walk
List files and show where we are:
......@@ -167,7 +171,7 @@ An actual terminal
---
# Bash For Programming
# Bash for programming
Bash can even be used as a (terrible) programming language, using commands like `for`, `if`, `while`, `[[` etc.
......@@ -437,7 +441,8 @@ Might be useful to add it to the startup file:
```bash
# pick most recently downloaded file. Store in a variable.
file=$(ls -tp1 ~/Downloads | grep -v "/$" | head -1)
dirs='Images,Videos,Documents,Documents/books,DELETE,OPEN'
# create ,-separated list of targets
dirs='~/Images,~/Videos,~/Documents,~/Documents/books,DELETE,OPEN'
# Display rofi to choose from actions. Store in variable.
choice=$(echo $dirs | rofi -dmenu -sep ',' -p "move '$file' to: ")
......@@ -450,7 +455,7 @@ choice=$(echo $dirs | rofi -dmenu -sep ',' -p "move '$file' to: ")
[[ "$choice" = OPEN ]] && xdg-open ~/Downloads/"$file" && exit
# otherwise move the file
mv ~/Downloads/"$file" "$choice"
mv ~/Downloads/"$file" $choice
```
Save the above in `/home/nils/filer.sh` and add a few lines of text in `~/.xbindkeysrc`:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment