shell 文件 插入行

Posted by wxianfeng Sun, 10 Jul 2011 22:44:00 GMT

一个rails2.x 的项目,需要迁移到rails3.x , ruby 1.9.2的编码问题,需要在rb文件头添加指定编码, 常见指定方式如下:

#coding:utf-8
#encoding:utf-8
# -*- coding: utf-8 -*-
# -*- encoding: utf-8 -*-

那么多rb文件总不能一个一个加吧,写个shell解决之!!!

This entry was posted on Sun, 10 Jul 2011 22:44:00 GMT and Posted in . You can follow any any response to this entry through the Atom feed. You can leave a comment or a trackback from your own site.

Tags , ,


Trackbacks

Use the following link to trackback from your own site:
http://wxianfeng.com/trackbacks?article_id=209

Comments

  1. Avatar
    tony {{count}} days ago:

    你好,请问你的博客现在用的是linode空间还是其他什么服务器阿?

  2. Avatar
    nomaka {{count}} days ago:

    shell 各种 方便

  3. Avatar
    wxianfeng {{count}} days ago:

    @tony
    Linode 512M

  4. Avatar
    Greece ferry over {{count}} years ago:

    Hi there, the whole thing is going well
    here and ofcourse every one is sharing data, that’s truly excellent, keep
    up writing.

  5. Avatar
    Greece ferry over {{count}} years ago:

    Hi there, the whole thing iis gojng well here and ofcourse every one is sharinbg data, that’s truly excellent,
    keep up writing.

  6. Avatar
    Italy - Greece over {{count}} years ago:

    An outstanding share! I have just forwarded this onto a co-worker who had been conducting a little research
    on this. And he actually bought me lunch duue to the fact that I discovered itt for him…
    lol. So let me reword this…. Thawnk YOU for the meal!!
    But yeah, thanx for spending time too talk about this issue here
    on your website.

  7. Avatar
    Italy - Greece over {{count}} years ago:

    An outstanding share! I havee just forwarded this onto a co-worker who haad been conducting a little research on this.

    And he actujally bought me lunch due to the fact that I discovered it forr him…
    lol. So let me reword this…. Thank YOU for the meal!!
    But yeah, thanx for spending time to taqlk about this
    issue here on your website.

Leave a comment