Created
January 29, 2013 05:21
-
-
Save yukidarake/4662008 to your computer and use it in GitHub Desktop.
行頭のコメントの下に/* jshint unused:false */を加えるというワンライナー。
ポイントは行番号$.をファイルごとにリセットする必要があるので、close ARGV if eofというイディオムを入れてみた。
あと、ackはやっぱり便利。
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
ack -f lib | xargs perl -i -pe 's#\*/\n#*/\n\n/*jshint unused: false */\n# if $. < 7; close ARGV if eof;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment