LSX-blog

Feed Rss

【收录】Linux下去掉^M的方法

02.15.2012, Linux, by .

第一种方法:
cat -A filename 就可以看到Windows下的断元字符 ^M
要去除他,最简单用下面的命令:
dos2unix filename

第二种方法:
sed -i ‘s/^M//g’ filename
#注意:^M的输入方式是 Ctrl + v ,然后Ctrl + M

第三种方法:
#vi filename

:1,$ s/^M//g
^M 输入方法: ctrl+V ,ctrl+M
第四种方法:
#cat filename |tr -d ‘\r’ > newfile
#^M 可用 \r 代替

【收录】Linux下去掉^M的方法 有 53 条回应

  1. [url=https://hydroxychloroquine.us.com/]cost of plaquenil in canada[/url] [url=https://hydroxychlorothiazide.com/]hydrochlorothiazide drug[/url] [url=https://azithromycin.us.org/]buy azithromycin[/url] [url=https://bupropion365.com/]150 mg bupropion[/url] [url=https://domperidone.us.com/]buy motilium without prescription[/url] [url=https://malegra.us.org/]buy malegra online[/url] [url=https://cephalexin365.com/]buy cephalexin[/url] [url=https://trazodonesale.com/]trazodone over the counter[/url] [url=https://chloroquinaralen.com/]chloroquine 500mg tab[/url] [url=https://zovirax.us.com/]zovirax herpes[/url] [url=https://metformin.us.org/]metformin[/url] [url=https://duloxetine.us.com/]cymbalta australia[/url] [url=https://cialisprice.us.org/]cialis lowest price[/url] [url=https://flomax.us.com/]flomax buy online[/url] [url=https://prednisolone.us.org/]buy cheap prednisolone[/url] [url=https://tamoxifenpct.com/]where to buy tamoxifen[/url] [url=https://attarax.com/]hydroxyzine atarax[/url] [url=https://nexium.us.org/]nexium otc coupon[/url] [url=https://singulair.us.com/]buy singulair[/url] [url=https://wellbutrin.us.org/]wellbutrin medicine[/url]

    回复
  2. Thank you for every other informative site. Where else may just I am getting that type of info written in such a perfect method?
    I’ve a undertaking that I’m just now operating on,
    and I have been on the look out for such information.

    回复
  3. I am really loving the theme/design of your blog.
    Do you ever run into any browser compatibility problems?
    A number of my blog visitors have complained about my site not working correctly in Explorer but looks great in Opera.
    Do you have any tips to help fix this issue?

    回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注