- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Viewing tab, white space and other special charact...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2009 12:14 PM
тАО10-18-2009 12:14 PM
I use "set list" command to view extra space at the end of line in vi editor.
How do i view tab, white space, and other special characters in vi editor ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2009 12:51 PM
тАО10-18-2009 12:51 PM
Re: Viewing tab, white space and other special character in vi editor
How's about
nroff -ms file1
nroff -ms file1 | ssp
col -b M < file1
rmnl
cat file1 | col -b
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2009 01:34 PM
тАО10-18-2009 01:34 PM
Solutionvi do not show all the special or non-printing characters most of times, and depends on version of vi.
Many versions of vi, ':set list' causes -
and
You can use 'od -cx' to get specil characters details with hex output (#cat filename | od -cx " , or cat -v to see the special characters.
And also you can try using vim or emcs ,
Hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2009 01:52 PM - last edited 2 weeks ago by Parvez_Admin
тАО10-18-2009 01:52 PM - last edited 2 weeks ago by Parvez_Admin
Re: Viewing tab, white space and other special character in vi editor
Hi Shiv:
In lieu of 'vi' it is very convenient to use:
# cat -etv file
Which will list tab characters as '^I'; formfeed characters as '^L'; newline characters as '$'. Other non-printing characters are displayed as defined in the 'ascii(5)' manpages: http://docs.hp.com/en/B2355-60130/ascii.5
Admin [above link is no longer valid, please visit https://support.hpe.com/connect/s/ ]
You can also use 'vis' to see otherwise non-printing characters: http://docs.hp.com/en/B2355-60130/vis.1
Admin [above link is no longer valid, please visit https://support.hpe.com/connect/s/ ]
The 'od' or ('xd') utility is also useful. For example using 'xd -ta file' works nicely with text data.http://docs.hp.com/en/B2355-60130/od.1.html
Admin [above link is no longer valid, please visit https://support.hpe.com/connect/s/ ]
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2009 06:01 PM
тАО10-18-2009 06:01 PM
Re: Viewing tab, white space and other special character in vi editor
I used to do :se list in vi command prompt after you can see lots of special characters
Tab characters as '^I';
Newline characters as '$'.
to come out from this use se nolist
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2009 06:49 PM
тАО10-18-2009 06:49 PM
Re: Viewing tab, white space and other special character in vi editor
The only command in vi to list characters like tab, carriage return etc is "set list"
See full options at :
http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2009 08:50 PM
тАО10-18-2009 08:50 PM
Re: Viewing tab, white space and other special character in vi editor
The same way, :set list
vis(1) also has several options for special chars.
>Raj: You can use 'od -cx' to get special characters details with hex output
If you really want hex, you should use xd(1).