From b31ace79ea5f6b3f279c544cd3a443d6fbf2a24d Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 26 Feb 2026 10:05:59 +0000 Subject: overhaul --- split-pipes | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'split-pipes') diff --git a/split-pipes b/split-pipes index 862e8be..58dcac4 100755 --- a/split-pipes +++ b/split-pipes @@ -1,9 +1,9 @@ #!/usr/bin/env ruby -require 'optimist' +require "optimist" -STDIN.set_encoding 'utf-8' -STDOUT.set_encoding 'utf-8' +STDIN.set_encoding "utf-8" +STDOUT.set_encoding "utf-8" conf = Optimist::options do banner "splitpipes -f < " @@ -32,10 +32,10 @@ end while line = STDIN.gets j = 1 - line.strip.split(' ||| ').each { |i| + line.strip.split(" ||| ").each { |i| if range && (conf[:field]..conf[:to]).include?(j) a << i.strip - elsif j == conf[:field] + elsif j == conf[:field] puts i.strip break end @@ -46,6 +46,3 @@ while line = STDIN.gets end a.clear end - - - -- cgit v1.2.3