Permalink
Browse files

Written app

  • Loading branch information...
1 parent 1728509 commit 627bdb32a99739a211a330d5aefd83284bf767f1 @djhworld committed Sep 16, 2012
Showing with 22 additions and 1 deletion.
  1. +7 −1 README.md
  2. +15 −0 makewords.d
View
@@ -1,2 +1,8 @@
makewords
-=========
+=========
+Inspired by the program used in [this video giving a light overview of the Unix operating system](http://techchannel.att.com/play-video.cfm/2012/2/22/AT&T-Archives-The-UNIX-System)
+
+Installation and Usage
+=========
+ $ dmd makewords.d
+ $ cat myfile.txt | ./makewords
View
@@ -0,0 +1,15 @@
+import std.stdio;
+import std.array;
+import std.string;
+
+void main() {
+ foreach(string e; lines(stdin)) {
+ auto line = split(e," ");
+ foreach(w; line) {
+ auto word = chomp(cast(string)w);
+ if(word != "") {
+ writeln(word);
+ }
+ }
+ }
+}

0 comments on commit 627bdb3

Please sign in to comment.