LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2010, 10:09 PM   #1
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
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
 
Old 03-09-2010, 11:34 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
See? Do you mean see those chars without using vi?
If so you can cat with the -v flag.
Code:
cat -v somefile
Evo2.
 
Old 03-10-2010, 12:15 AM   #3
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by evo2 View Post
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
 
Old 03-10-2010, 12:23 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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.
 
Old 03-10-2010, 01:04 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by elainelaw View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
carriage return mike2008 Linux - Newbie 3 10-15-2009 01:03 AM
vsftpd carriage return issue taylorjp75 Linux - Software 1 07-14-2009 07:55 AM
carriage return in emac lisp balloon Programming 1 11-23-2004 09:29 AM
Inserting a carriage return in awk legtester Linux - General 1 08-17-2003 06:29 PM
pppd...carriage return?!? icyfire Linux - Software 1 02-14-2002 08:07 AM


All times are GMT -5. The time now is 04:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration