Bash Scripts and Make
BIOS 611: Introduction to Data Science
Instructor Matt Biggs
Overview of today
BIOS 611
Review
BIOS 611
Objectives
BIOS 611
Remote servers & VCL demonstration
The VCL is a UNC computer platform available to students. Take a moment to reserve an instance, then it should be ready by the time we reach the exercise.
BIOS 611
Project 2 “concept README”
Populate the README.md file in your project with a description of what you intend to do.
The purpose is to get you thinking about the project logistics.
Describe:
BIOS 611
Unix Bash
Bash is the native language of the Unix operating system.
You type Bash commands into the “Terminal”.
Why interact with a computer in this “archaic” way?
BIOS 611
Unix Bash: The first course of commands
BIOS 611
Essential Bash Commands
pwd - where am I?
cd - “change directory”
../ - up a directory
~ - home directory
Tab - complete
ls - list files in current directory
Cntrl-C - Kill process
head - print first few lines of a file
tail - print last few lines of file
touch - create a new file
mkdir - create a new directory
rm - delete files
mv - move/rename files
cp - copy files
BIOS 611
More Essential Bash Commands
echo - display characters
cat - print contents of file and/or concatenate
vim/nano - text editors
> - redirect text into a file
sudo - run command with admin privileges
sort - order rows
uniq - keep unique values
man <cmd>- manual page for a command
There is a whole universe of other commands to learn! Tools for editing files, parsing spreadsheets, checking CPU usage, running programs in parallel, editing images, sending emails, and many other tasks.
Get comfortable with the basics, then learn more as you progress.
Bash commands facilitate automation.
BIOS 611
Vim basics
vim file_name - enter vim editor
“i” - to enter “insert” mode
Esc - to exit “insert” mode
:wq - save changes and quit
BIOS 611
Remote servers
Most “industrial scale” data science is done “in the cloud”, on computers located somewhere else. But why? What problems does cloud computing solve?
Some advantages:
BIOS 611
Remote servers
Skills needed to use remote computers:
BIOS 611
Bash demonstration
BIOS 611
QUIZ
Remote servers & VCL exercise
The VCL is a UNC computer platform available to students.
BIOS 611
Bash exercise (as always, feel free to help each other)
BIOS 611