Created
October 5, 2013 06:50
-
-
Save libsteve/6837567 to your computer and use it in GitHub Desktop.
A quick script to take a file in from stdin and write it to stdout, replacing all tabs with four spaces.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# take standard in text and replace all the tab instanes with four spaces | |
# print the resulting test to standard out | |
line = "" | |
while (line = gets) != nil do | |
line.gsub! "\t", " " | |
puts line | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment