|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
This "SHOULD" be a simple question,
but looking through several books has turned up nothing, so I turn once again to the experts!! How do you vi a file so that you can see special characters. I believe my /etc/passwd file is being corrupted during an upgrade process, however the files "look" the same. I need to vi /etc/passwd to see if there are any special characters being thrown in. Thanks Recon |
| Sponsored Links | ||
|
|
|
||||
|
Quote:
The real problem is that some bytes could have values in the range of 128 to 255 and you may not have an 8 bit data path to your terminal. Depending on the stty settings, the MSB may be a parity bit rather than a data bit. Also not all terminals will display something for non-ascii characters. And a final problem is that, I think, vi balks at attempting to display nulls, although it will count them and display a count at startup time. |
|
||||
|
VI REFERENCE ....
Click here for a printable VI on-line reference.
BTW: Not sure, but perhaps you can use diff to compare the two files. I don't think (but not sure) you will get an exact match with diff if special or hidden chars are present.... perhaps someone could comment? Also, you might consider playing round with stty and the flags for raw and cooked modes. I recall a few years ago using stty in raw mode to help find/print special chars.... not sure if we used vi or just cat to display.... somehow I recall playing with both stty and vi to find hidden chars in a file, but it has been many years ago.... stty man page here ... |
|
|||
|
Try emacs. It will display nulls as ^@
It will even let you delete it with Ctrl-d (Control and letter d) to delete 1 character. I'm not an emacs user but it comes in handy sometimes. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with AWK -- quick question | Probos | Shell Programming and Scripting | 5 | 07-18-2007 05:26 PM |
| quick question | keith.m | AIX | 5 | 12-21-2006 09:27 AM |
| quick sed question | vbm | Shell Programming and Scripting | 2 | 11-09-2006 10:44 PM |
| quick question | pkolishetty | UNIX for Dummies Questions & Answers | 2 | 09-02-2006 12:56 PM |
| Ok quick question | Corrail | Shell Programming and Scripting | 1 | 11-11-2005 01:49 PM |