- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Remove Control Characters ( ¾^ , Control-L, Contr...
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
Forums
Discussions
Discussions
Discussions
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
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
02-25-2004 08:09 AM
02-25-2004 08:09 AM
Remove Control Characters ( ¾^ , Control-L, Control-C )
Could you please assist:
1) How to get rid of all these control characters.
2) Also which format is this control character, Could'nt understand these characters;
3) How does these control characters gets created .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 08:14 AM
02-25-2004 08:14 AM
Re: Remove Control Characters ( ¾^ , Control-L, Control-C )
you could use the commands, strings, vis, od/xd.
3) How does these control characters gets created
your usually looking at binary data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 08:31 AM
02-25-2004 08:31 AM
Re: Remove Control Characters ( ¾^ , Control-L, Control-C )
With tr it is possible to translate (or remove) character classes (for example "cntrl"). Have a look at the man page for tr.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 08:36 AM
02-25-2004 08:36 AM
Re: Remove Control Characters ( ¾^ , Control-L, Control-C )
tr -cd "[ -~\012]" < infile > outfile
That will strip anything not ' ' thru '~' or a LF.
If you don't know where these characters are coming from, how can we? These could easily be terminal escape sequences to position characters on the screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:46 PM
02-25-2004 06:46 PM
Re: Remove Control Characters ( ¾^ , Control-L, Control-C )
cat -tv
Mind this might remove more then you want... like
You could replace the . with [@CLM] or things like that to remove a specific range of CTRL strings.
2) ^L == Form feed -> get to next page when printing to printer
^C == ? Normally no special meaning, but could be part of some printer language.
The other one is not readable to us, but that could be caused by it being a ASCII code outside the default readable ASCII range of 32-126. The first 27 ASCII values are the control characters etc.
3) In most cases the file is a data file, containing binary data. For instance, when writing the number 3 to a file, it will show as a
So it completely depends on what generated these files how to make it completely readable. In most cases you will need a good translation program which is created to understand the structure of a file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:51 PM
02-25-2004 06:51 PM
Re: Remove Control Characters ( ¾^ , Control-L, Control-C )
If you KNOW it is supposed to be just a plain old ascii file then fine, strip them out as mentioned above, otherwise, I'd leave it as it is.