LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   read carriage return code (https://www.linuxquestions.org/questions/linux-newbie-8/read-carriage-return-code-794341/)

elainelaw 03-09-2010 09:09 PM

read carriage return code
 
I have a text file have carriage return code ^L , ^K , I can use vi to read this code , can advise if I want to see this code , what can i do ? thx

evo2 03-09-2010 10:34 PM

See? Do you mean see those chars without using vi?
If so you can cat with the -v flag.
Code:

cat -v somefile
Evo2.

elainelaw 03-09-2010 11:15 PM

Quote:

Originally Posted by evo2 (Post 3892388)
See? Do you mean see those chars without using vi?
If so you can cat with the -v flag.
Code:

cat -v somefile
Evo2.


thx ,

But I mean I use vi is unable to see those chars eg. ^K , I just would like to ask how can I see this chars ? thx

evo2 03-09-2010 11:23 PM

Quote:

But I mean I use vi is unable to see those chars eg. ^K , I just would like to ask how can I see this chars ?
Are you asking how to see those non-printing characters in vi?

If so I can't help: I only use vi when no other text editors are installed.

Evo2.

catkin 03-10-2010 12:04 AM

Quote:

Originally Posted by elainelaw (Post 3892418)
But I mean I use vi is unable to see those chars eg. ^K , I just would like to ask how can I see this chars ? thx

It could be a vi (elvis or vim?) configuration issue because it works for me
Code:

c@CW8:/tmp$ echo $'\a\b\e\f\n\r\t\v' > trash && vi trash
Here's what it looks like in vi (vim)
Code:

^G^H^[^L
^M  ^K



All times are GMT -5. The time now is 03:07 PM.