w****c 发帖数: 10 | 1 a question about vi:
"man ls > ls.out" which redirects output to ls.out.
then i try to look at it in vi by "vi ls.out". I see that
a lot of "^H" in the content which distracts my view.
question as is:
1.I try to delete them using s/\^H/\ /g. but doesn't
match the pattern given.I could not match against "^H" using
\^H in the regular expression. What is "^H" from ? and how
could I match against it?
2. in vi line comannd ":", how can I represent the
Ctrl key "^"?It is the small quest |
w****c 发帖数: 10 | 2 nobody could answer this question?
【在 w****c 的大作中提到】 : a question about vi: : "man ls > ls.out" which redirects output to ls.out. : then i try to look at it in vi by "vi ls.out". I see that : a lot of "^H" in the content which distracts my view. : question as is: : 1.I try to delete them using s/\^H/\ /g. but doesn't : match the pattern given.I could not match against "^H" using : \^H in the regular expression. What is "^H" from ? and how : could I match against it? : 2. in vi line comannd ":", how can I represent the
|
h**h 发帖数: 132 | 3 1> man ls | col -b > ls.out
that should solve your problem
2> if you really want to use man ls > ls.out
and vi it, try :%s/^v^H//g
【在 w****c 的大作中提到】 : nobody could answer this question?
|
w****c 发帖数: 10 | 4 thanks.
1) it works well.
2) I tried this out. and failed to match it.
I don't understand the meaning of ^v^H ?
anyway.thanks
【在 h**h 的大作中提到】 : 1> man ls | col -b > ls.out : that should solve your problem : 2> if you really want to use man ls > ls.out : and vi it, try :%s/^v^H//g
|
t********e 发帖数: 880 | 5
ctrl-V crtl-H
【在 w****c 的大作中提到】 : thanks. : 1) it works well. : 2) I tried this out. and failed to match it. : I don't understand the meaning of ^v^H ? : anyway.thanks
|