Sponsored Content
Top Forums Shell Programming and Scripting Hidden control characters in a Unix Text File! Post 302241847 by balan_mca on Tuesday 30th of September 2008 12:35:15 PM
Old 09-30-2008
MySQL how to remove a special char and whitespace char in a file

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
 

10 More Discussions You Might Find Interesting

1. Programming

Identifying and removing control characters in a file.

What is the best method to identify an remove control characters in a file. Would it be easier to do this in Unix or in C. (0 Replies)
Discussion started by: oracle8
0 Replies

2. AIX

Randomly appearing control characters in text files

Hi, From some time, we have noticed that our ascii files have started corrupting due to the presence of some random control characters (^@, ^M, ^H, ^D). The characters appear randomly on any file after the process that creates the file finishes. If we rerun the process, the files re creates... (0 Replies)
Discussion started by: aakashahuja
0 Replies

3. UNIX for Advanced & Expert Users

Hidden Characters

Hello all, I have two files, that I suspect may contain hidden characters (EG, three spaces instead of a tab). Does anyone know of any tool that can display this (I have tried using diff, but I'm not quite sure it would do the job) (6 Replies)
Discussion started by: Khoomfire
6 Replies

4. Shell Programming and Scripting

display all possible control characters from .xml file in unix

Hi, I have a .xml file in unix. We are passing this file through a xml parser. But we are getting some control characters from input file and XML parser is failing for the control character in file.Now I am getting following error, Error at byte 243206625 of file filename_$.xml: Error... (1 Reply)
Discussion started by: fantushmayu
1 Replies

5. Shell Programming and Scripting

Removing "Hidden Characters" on a file

Hi - I'm having a problem with hidden characters on Linux. When I produced an output from Oracle database, there is a an extra "Hidden Character" included on the output. How can I remove that character? See below: The extra dollar sign is creating a new line on my .csv output file. I... (16 Replies)
Discussion started by: Jin_
16 Replies

6. Shell Programming and Scripting

Request for advise on how to remove control characters in a UNIX file extracted from top command

Hi, Please excuse for posting new thread on control characters, I am facing some difficulties in removing the control character from a file extracted from top command, i am able to see control characters using more command and in vi mode, through cat control characters are not visible ... (8 Replies)
Discussion started by: karthikram
8 Replies

7. UNIX for Dummies Questions & Answers

Control characters in UNIX

Hi, My files are showing some control characters in vi editor ^M ^@ and somtimes ^H I removed ^M with %s/^M//g command but how to represent ^@ and ^H e.g. for ^M it is hold ctrl then v and m.. Please help.. I am very new to unix.. (7 Replies)
Discussion started by: prabhat.diwaker
7 Replies

8. Shell Programming and Scripting

How to view the control characters in a file?

Hello, How can I view control and special characters of a text file?. For example, space, tabs, new line chars etc. Can I use hexdump for it? Thanks (3 Replies)
Discussion started by: reddyr
3 Replies

9. Red Hat

Special control characters in file

Hi Guys, We receive some huge files on to Linux server. Source system use FTP mechanism to transfer these files on our server. Occasionally one record is getting corrupted while transfer, some control characters are injecting into the file. How to fix this issue ? please advice ? Sample... (2 Replies)
Discussion started by: srikanth38
2 Replies

10. Shell Programming and Scripting

Need to strip control-A characters from a column in a file

Hi All, I currently have flat file with 32 columns. The field delimiter is cntl-A ( \x01). The file has been extracted from an oracle table using a datastage job. However, in the 6th field, the data contains additional control -A characters which came as a part of the table data. I need... (12 Replies)
Discussion started by: harsha1238
12 Replies
crypt(1)																  crypt(1)

NAME
crypt - encode or decode a file SYNOPSIS
crypt [password] The crypt utility encrypts and decrypts the contents of a file. crypt reads from the standard input and writes on the standard output. The password is a key that selects a particular transformation. If no password is given, crypt demands a key from the terminal and turns off printing while the key is being typed in. crypt encrypts and decrypts with the same key: example% crypt key < clear.file > encrypted.file example% crypt key < encrypted.file | pr prints the contents of clear.file. Files encrypted by crypt are compatible with those treated by the editors ed(1), ex(1), and vi(1) in encryption mode. The security of encrypted files depends on three factors: the fundamental method must be hard to solve; direct search of the key space must be infeasible; "sneak paths" by which keys or cleartext can become visible must be minimized. crypt implements a one-rotor machine designed along the lines of the German Enigma, but with a 256-element rotor. Methods of attack on such machines are widely known, thus crypt provides minimal security. The transformation of a key into the internal settings of the machine is deliberately designed to be expensive, that is, to take a substan- tial fraction of a second to compute. However, if keys are restricted to (say) three lower-case letters, then encrypted files can be read by expending only a substantial fraction of five minutes of machine time. Since the key is an argument to the crypt command, it is potentially visible to users executing ps(1) or a derivative command. To minimize this possibility, crypt takes care to destroy any record of the key immediately upon entry. No doubt the choice of keys and key security are the most vulnerable aspect of crypt. /dev/tty for typed key See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ des(1), ed(1), ex(1), ps(1), vi(1), attributes (5) 8 Mar 2005 crypt(1)
All times are GMT -4. The time now is 01:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy