Emulate a Simple Unix Shell 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
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.)