BBS水木清华站∶精华区
发信人: twist (胖胖鼠 ~努力减肥中), 信区: Unix
标 题: UNIX TIP: CLEANUP DOS FILES
发信站: BBS 水木清华站 (Wed Aug 25 07:22:40 1999)
CLEANUP DOS FILES
If you deal with DOS files and the "^M" character
always appears at the end of the line, here are
two ways to get rid of them.
If you edit the DOS text file with the "vi"
editor in UNIX, use the following from the
"vi" command line:
∶%s/^V^M//g
>From a Unix shell use the command:
% sed 's/^V^M//g' foo > foo.new
NOTE: ^V is control V and ^M is control M or Enter
--
______ _ __
/_ __/_ __ (_) _____ / /_ 好 好 学 习
/ / | | /| / / / / / ___// __/ 天 天 减 肥
/ / | |/ |/ / / / (__ )/ /_
/_/ |__/|__/ /_/ /____/ \__/ 俺一直在努力......
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 162.105.138.50]
BBS水木清华站∶精华区