seevibes/pre-interview-test — pull request #11 by emscotto (2014-04-02 08:43:19+00:00)
Title: Hi @francois. this is my contribution: Unix Shell program ;)

Hi @francois

Here is my program. It is a simple Bourne-Shell Unix (sh). I could do it in C# but making it using Unix commands was more challenging to me ;)
Also, I've used the "regular" IMDB xml API, (which is horrible...)

Usage session in 9 actions:
1/ Double click on the file seevibes-testApp (please don't forget chmod +x for making it executable if needed) or type sh seevibes-testApp in command line
2/ You will be asked for a partial movie name. Type "batman"
3/ The process will be launched and the title should be "batman" with "1989" as year. This is the first occurence in the IMDB XML file
4/ Type "y" for trying again
5/ Then, type "begins". theresult will be "Untitled Batman Begins Sequel" as Title and "2008" as year
6/ Type "y" for trying again
7/ Type nothing and validate by hiting "enter" touch. You should get a message and be asked again for a query
8/ Type "lkjghlkfj". You should get a message saying that's not a movie referenced in IMDB
9/ Type "n" or any other key (except y of course) for shuting down the program

Technical stuffs
- bin/sh file
- tested on Mac
- need xmllint with path
- don't forget chmod +x on file for making it executable ;)