diff options
| author | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
|---|---|---|
| committer | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
| commit | b31ace79ea5f6b3f279c544cd3a443d6fbf2a24d (patch) | |
| tree | 31f2b599fa5f6996aeb134390d58deb63eefe04a /select | |
| parent | 8805e95ae94d798c6441f7e1b72c90e049563f17 (diff) | |
Diffstat (limited to 'select')
| -rwxr-xr-x | select | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,11 +1,11 @@ #!/usr/bin/env ruby -require 'optimist' -require 'zipf' +require "optimist" +require "zipf" opts = Optimist::options do banner "sample --index <n> [--shuffle] [--file <line separated data>]" - opt :file, "Input file.", :type => :string, :default => '-' + opt :file, "Input file.", :type => :string, :default => "-" opt :index, "Index file.", :type => :string, :required => true end @@ -15,4 +15,3 @@ index = ReadFile.readlines_strip(opts[:index]).map{ |i| i.to_i } index.each { |i| puts input[i] } - |
