Let's get ready to hit the ground running. There's no deliverable due before next class, but I would like everyone to have access to their Linux install. Please let me know if there are issues, also, seeking help in Discord is an option.
Linux and the Command Line: Presentation-Style Raw Single Page Scroll
Basic info: ./LIS5364-ProgrammingBasicsvBash.pdf
Scripting and Programming: Single Page Scroll
Networking and the Shell: Single Page Scroll
Linux and The web: Linux and the web
More materials on the tasks presented in class:
How to use rsync:
Very simply, for our purposes, here's what you can do, step by step. The following would be for hypothetical web development, though you could adapt this strategy for your bash scripts.
- Create a folder on torch, e.g. /home/FSUID/public_html/mysite
- Create your working folder locally, eg /home/pi/html/mysite
rsync -rin /home/FSUID/public_html/mysite/ /home/pi/html/mysite/
HA JUST KIDDING. Note the "n" , which means "dry run" This just SHOWED you what would happen. When you're ready for the real deal, lose the n. WATCH YOUR ENDING SLASHES
Now, if you want to automate this, one way is with an alias. In your local .bashrc file, e.g. /home/pi/.bashrc - you could add, eg.
torchsync="rsync -ri /home/FSUID/public_html/mysite/ /home/pi/html/mysite/"
Along with the slides above, here are more resources about Bash.
If you have some familiarity with other languages - https://learnxinyminutes.com/docs/bash/ is great.
Some of the stuff in here we haven't gotten to, but the bits on variables and quotes are very good - https://wiki.bash-hackers.org/scripting/newbie_traps
A very quick intro in video form https://omgenomics.com/writing-bash-script/
For those who want to get an early start: Here is the (likely much longer and multi-week):
I suggested that there would be a deliverable this week, but upon review I believe it's best to not assign the first exercise until we have a little more Bash under our collective belts. You may skim the below to get a feel of where we are going.
+More Bash Resources
The expectation is that everyone will have access to their Linux Desktop (most importantly, a Command Line) for next week. Here is some information there for Virtual Machine Folks.
Install Raspbian Desktop on a Virtual Machine (VirtualBox) - The Robotics Back-End
You don't need to fully know the following, but they are good overviews.
A clever thing on CODE in general. Huge, but I've found it to be worth it.
2021-01-12 LIS-5364 - Web and Linux Admin - recording_1
2021-01-19 LIS-5364 - Web and Linux Admin - recording_2
2021-01-26 LIS-5364 - Web and Linux Admin - recording_3
2021-02-02 LIS-5364 - Web and Linux Admin - recording_4
2021-02-09 LIS-5364 - Web and Linux Admin - recording_5
2021-02-16 LIS-5364 - Web and Linux Admin - recording_6
2021-02-23 LIS-5364 - Web and Linux Admin - recording_7
2021-03-02 LIS-5364 - Web and Linux Admin - recording_8
2021-03-09 LIS-5364 - Web and Linux Admin - recording_9
2021-03-16 LIS-5364 - Web and Linux Admin - recording_10
2021-03-23 LIS-5364 - Web and Linux Admin - recording_11
2021-03-30 LIS-5364 - Web and Linux Admin - recording_12