Created
January 12, 2012 19:05
-
-
Save mh61503891/1602423 to your computer and use it in GitHub Desktop.
TeXソースファイルから全角文字が含まれている行を行番号付きで表示するRubyスクリプト
This file contains 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
#!/bin/sh | |
# Example: $ cat example.txt | this_script | |
# This script works only for ruby 1.9.x | |
ruby1.9 -e 'while l=gets;puts "#{$stdin.lineno} #{l}" if l !~ /\A\s*%/&&!l.each_char.select{|c|c.bytesize!=1}.empty?;end' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment