7 kyu
Parsing Commandline Arguments
79 of 322btaitelb
Description:
We're given some typical *nix commands and want to parse them into their arguments. We'll ignore quoted arguments and other special characters, although if any of the characters &
, ;
, >
, |
show up, those signify that a new command has started (so we can ignore any arguments after it).
##Examples
ls -R / ["ls", "-R", "/"]
cat /tmp/data.txt | less
["cat", "/tmp/data.txt"]
(note that we ignored the extra leading spaces on that last example)
Parsing
Regular Expressions
Fundamentals
Similar Kata:
Stats:
Created | May 13, 2015 |
Published | May 13, 2015 |
Warriors Trained | 852 |
Total Skips | 224 |
Total Code Submissions | 1894 |
Total Times Completed | 322 |
Ruby Completions | 79 |
JavaScript Completions | 257 |
Total Stars | 15 |
% of votes with a positive feedback rating | 86% of 118 |
Total "Very Satisfied" Votes | 93 |
Total "Somewhat Satisfied" Votes | 18 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 40 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 8 kyu |