![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hidden Characters | Khoomfire | UNIX for Advanced & Expert Users | 6 | 07-06-2007 05:40 AM |
| Formatting a text file based on newline and delimiter characters | ntekupal | Shell Programming and Scripting | 5 | 05-11-2007 04:33 PM |
| missing hidden characters | SUSANR9999 | UNIX for Dummies Questions & Answers | 2 | 11-09-2006 04:30 PM |
| Randomly appearing control characters in text files | aakashahuja | AIX | 0 | 07-18-2006 06:26 AM |
| Identifying and removing control characters in a file. | oracle8 | High Level Programming | 0 | 04-13-2004 07:08 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
Can anyone seem to know how to find out whether a UNIX text file has 'hidden' control characters?
Can I view them using 'vi' by some command line options? If there are control characters in a text file which are invisible/hidden.. then how do I get rid of them? Your intelletual answers are greatly appreciated. Thanks in anticipation. ![]() |
|
||||
|
Surely VI is okay for text file though?
Using ":set list" in vi will tell you any tab's (^I) and show whitespace by giving you the eol character '$' Don't know how good this is for other 'special characters' etc. |
|
||||
|
Don't know if this helps, but python can give you a quick view of the control characters in the file.
python -c "f = open('filename.txt', 'r'); f.seek(0); file = f.readlines(); print file" Just replace filename.txt with your filename. |
|
||||
|
Hi pals,
Could you guys clear my doubts?.. I want to remove all white space chars, ctrl key chars, arrow key chars, Esc key char and del key chars... for ex.. Get the input value[ while typing use all arrow keys/del keys/esc key] and store it one file. for example you can get this input value as Hello^[[AHow a^[[D]re you^[ " but, I wanna the o/p will be Hello How are you? plz, solve my query guys Thnx in advance |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|