San Francisco
May 14, 2015

Emulate a Simple Unix Shell in Ruby

We're going to explore some basics of the unix shell by writing an emulator in ruby.

We've been issuing commands in our terminals like rake db:migrate or rails new, and last week we even wrote a commandline app in ruby, but how do these commands work under the hood? How does typing ruby ./wikipedia_roulette.rb launch our app? This week we'll get some insight into this by building a fun emulator.

We'll cover the following topics:

  • command-line argument parsing
  • basic *nix commands
  • standard input, output, and error streams

If we have time, we'll cover some of these:

  • output redirection to a file
  • piping the output of one command into the input of another
  • useful commands like grep, find, and less

Be sure to complete the following Codewars challenge before class! (If your RailsSchool profile includes your Codewars username, you'll get a nifty star if you complete the challenge.)
http://www.codewars.com/kata/parsing-commandline-arguments/train/ruby



2:30pm Pacific - 4:30pm Pacific on May 14, 2015 at Coshx Labs
6 students were there

Whiteboard

Please, sign in to see the Whiteboard