Skip to content

Commit

Permalink
Written app
Browse files Browse the repository at this point in the history
  • Loading branch information
djhworld committed Sep 16, 2012
1 parent 1728509 commit 627bdb3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
@@ -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
15 changes: 15 additions & 0 deletions makewords.d
@@ -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.