CS 330 Lecture 1 – Shello
- shell basics
- echo, cat, bc, head, tail, cut, grep
- man pages
- changing working directories
- shell builtin variables
- tab completion
- custom variables
- reusing output
- command-line arguments
Who are you?
- Where from?
- Last unassigned book you read?
- If not computers, what?
Setting your shell
I’m not certain what your shell program is. Probably it’s bash or tcsh. bash is prolific, making web searches fruitful when you need help. Let’s not speak of tcsh. My personal favorite shell is zsh. Sadly, I cannot change my shell permanently on our university machines. Instead, I hijack my bash startup files and run zsh instead. To get zsh up and running, I added these lines to my $HOME/.bash_profile:
[ -f /bin/zsh ] && exec /bin/zsh -l [ -f /usr/bin/zsh ] && exec /usr/bin/zsh -l
- Read the syllabus.
- Read chapter 13 through section 13.2.1.
- Write and run a script on the CS servers. (Find or learn an editor: vi, emacs, pico, nano, etc. Or mount your H: drive and use a windowed editor.)
- Bring a quarter sheet with two questions and two observations.
- Programs are functions.
- The command-line is your editor.
- Shell code is fast to code, not safe.
That program will shackle you
Be in command(-line)