## How to Remove Special Characters

How to Remove Special Characters
# 1
09-01-2009
How to Remove Special Characters

Dear Members,

We have a file which contains some special characters. I need to replace these special character by a new line character(\n).

The Special character is \x85.

I am not sure what this character means and how we can remove it.

Any inputs are greatly appreciated.

Thanks
Sandeep
 sandeep_1105 View Public Profile for sandeep_1105 Find all posts by sandeep_1105
# 2
09-01-2009
(Post withdrawn)

Last edited by methyl; 09-01-2009 at 06:43 PM.. Reason: Post contained errors
 methyl View Public Profile for methyl Find all posts by methyl
# 3
09-01-2009

I tried using your commands but it replaces the special character with a $sign instead of new line character. After this i again tried to replace$ with a newline character, then it replaces $with some special symbol again. Not sure what i am doing wrong.  sandeep_1105 View Public Profile for sandeep_1105 Find all posts by sandeep_1105 # 4 09-01-2009 Oops. Try this - it should work this time. X85 = octal 205  methyl View Public Profile for methyl Find all posts by methyl # 5 09-01-2009 Thanks Methyl, Its adding new line characters now. I am very new to UNIX, so what exactly are you doing here. I guess you are converting from hexadecimal to octal and searching for that octal character. Correct me if i am wrong. Thanks  sandeep_1105 View Public Profile for sandeep_1105 Find all posts by sandeep_1105 # 6 09-01-2009 I have a confession. I used the M$ Windows "calc" program to convert from hex to octal. We could of course have used unix "bc".

I've called the environment variable "X85" . It's just a name.

The special syntax to "echo" just allows you to generate any character from its octal representation. The "\c" at the end of the string stops "echo" adding a newline.

The translate program "tr" used in this way translates all occurances of one character to another character. Program "tr" and many others use "\n" to represent a newline.
 methyl View Public Profile for methyl Find all posts by methyl

Test Your Knowledge in Computers #756
Difficulty: Medium
The difference between EPROM and EEPROM is based on the way that the memory programs and erases.
True or False?

## How to remove special characters?

Hi Gurus, I have file which contains some unicode charachator like "ü". I want to replace it with some charactors. I searched in internet and got command sed "s/ü/-/g", but I don't know how to type ü in unix command line. Please help me for this one. Thanks in advance

## How to remove some special characters in a string?

Hi, I have string like this ="Lookup Procedure" But i want the output like this Lookup Procedure =," should be removed. Please suggest me the solution. Regards, Madhuri

## Sed - remove special characters

Hi, I have a file with this line, it's always in the first line: I want to remove these special characters: ´╗┐ file1 ´╗┐\\bar\c$\test2\;3.348.118 Bytes;160 ;3 \\bar\c$\test\;35 Bytes;2 ;1 I want the same file to be only \\bar\c$\test2\;3.348.118 Bytes;160 ;3 \\bar\c$\test\;35...

## Remove the special characters from field

Hi, In source data few of columns are having special charates(like *) due to this i am not able to display the data into flat file.it's displaying the some of junk data into the flat file. source dataExample: Address1="XDERFTG * HYJUYTG" how to remove the special charates in a string

## Remove string between two special characters

Hi All, I have a variable like AVAIL="\ BACK:bkpstg:testdb3.iad.expertcity.com:backtest|\ #AUTH:authstg:testdb3.iad.expertcity.com:authiapd|\ TEST:authstg:testdb3.iad.expertcity.com:authiapd|\ " What I want to do here is that If a find # before any entry, remove the entire string...

## remove special characters

hello all I am writing a perl code and i wish to remove the special characters for text. I wish to remove all extended ascii characters. If the list of special characters is huge, how can i do this using substitute command s/specialcharacters/null/g I really want to code like...

## Files with special characters - how to remove

Hi, I have a directory that has a file which contained special characters in the filename. Can someone please advise how to remove the file, preferably with a rm -i ? Thanks in advance. Listing is as below: {oracle}> ls -1b bplog.bkup.001 bplog.bkup.002 bplog.bkup.003 bplog.bkup.004...

## remove special and unicode characters

Hi, How do I remove the lines where special characters or Unicode characters appear? The following query does work but I wonder if there is a better way. cat test.txt | egrep -v '\)|#|,|&|-|\(|\\|\/|\.' The following lines show that my query is incomplete. Warning: The word "*Khan" is...