Sponsored Content
Full Discussion: Replacing hex characters
Top Forums UNIX for Dummies Questions & Answers Replacing hex characters Post 302522261 by figaro on Saturday 14th of May 2011 03:22:55 AM
Old 05-14-2011
Replacing hex characters

I have the following file consisting of dates and sample measurements:
Code:
05��Oct��2010	1.31��
06��Oct��2010	1.32��
07��Oct��2010	1.31��

The hex characters are \xc2\xa0 in sequence.
I have tried to remove the characters as follows:
Code:
sed -i '' -e 's/\xc2\xa0//g' file.dat

and as follows (replace characters with a space):
Code:
tr '\194' '\032' < file.dat > file_.dat
tr '\160' '\032' < file_.dat > file__.dat

However, neither method worked. The first probably couldn't find the characters and left the file untouched and the second replaced some of the hex characters with other hex characters.

Can someone point out the mistakes or indicate an alternative method?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing all but last Hex characters in a text line

I must remove hex characters 0A and 0D from several fields within an MS Access Table. Since I don't think it can be done in Access, I am trying here. I am exporting a Table from Access (must be fixed length fields, I think, for my idea to work here) into a text format. I then want to run a... (2 Replies)
Discussion started by: BAH
2 Replies

2. HP-UX

Hex characters of ascii file

Hi, Whats the command or how do you display the hexadecimal characters of an ascii file. thanks Bud (2 Replies)
Discussion started by: budrito
2 Replies

3. Shell Programming and Scripting

replacing characters

hi all I have a file that has sone spaces in start then / at last. i want to get rid of this. how to do? eg. 11414/ 49878/ 27627/ I WANT THE FILE AS 11414 49878 27627 PLEASE HELP (3 Replies)
Discussion started by: infyanurag
3 Replies

4. Shell Programming and Scripting

Replacing Characters

Hi All, I have a file which is delimeted with the character '. i need to replace this character with the same character and also a new line. Can anyone please help me with the tr command for this. Many thanks Karan (11 Replies)
Discussion started by: karansachdeva
11 Replies

5. Shell Programming and Scripting

Replacing Characters with |

Hi All, example data.log 526569346 66815531961 09 526569346 66815531961 09 526569346 66815531961 09 526569346 66815531961 09 526569346 66815531961 09 I want like this to 526569346|66815531961|09 526569346|66815531961|09... (4 Replies)
Discussion started by: ooilinlove
4 Replies

6. Shell Programming and Scripting

Replacing hex characters '\x0D' with '\x0D\x0A'

Hello All, I have a requirement where I need to replaced the hex character - '\x0D' with 2 hex characters - 'x0D' & 'x0A' I am trying to use SED - But somehow its not working. Any pointers? Also the hex character '\x0D' can occur anywhere in the line. Can this also be accomplished... (6 Replies)
Discussion started by: paragkalra
6 Replies

7. Shell Programming and Scripting

Convert hex values to displayable characters

Hi, I am a bit stuck with displaying characters. I am having values like below in the proper displayable characters. which I would want to print the actual value on the right hand side. I dont want to create an array because I would have to create 255 different values. isnt there another way of... (17 Replies)
Discussion started by: ahmedwaseem2000
17 Replies

8. Shell Programming and Scripting

Grepping for hex characters - explanation?

Hello, Yesterday I was looking for a way to grep for a tab in the shell, and found this solution in several places: grep $'a' # Grep for the letter 'a' between two tabs I'm fine with most of this, but I don't understand what the $ (dollar sign) before the first quote does. It doesn't work... (7 Replies)
Discussion started by: mregine
7 Replies

9. Shell Programming and Scripting

sed replacing specific characters and control characters by escaping

sed -e "s// /g" old.txt > new.txt While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies

10. HP-UX

Replacing Hex Characters In A File Using awk?

Hi guys, First off, i'm a complete noob to UNIX and LINUX so apologies if I don't understand the basics! I have a file which contains a hex value of '0D' at the end of each line when I look at it in a hex viewer. I need to change it so it contains a hex value of '0D0A0A' I thought... (10 Replies)
Discussion started by: AndyBSG
10 Replies
g_wheel(1)					 GROMACS suite, VERSION 4.5.4-dev-20110404-bc5695c					g_wheel(1)

NAME
g_wheel - plots helical wheels VERSION 4.5.4-dev-20110404-bc5695c SYNOPSIS
g_wheel -f nnnice.dat -o plot.eps -[no]h -[no]version -nice int -r0 int -rot0 real -T string -[no]nn DESCRIPTION
g_wheel plots a helical wheel representation of your sequence. The input sequence is in the .dat file where the first line contains the number of residues and each consecutive line contains a residue name. FILES
-f nnnice.dat Input Generic data file -o plot.eps Output Encapsulated PostScript (tm) file OTHER OPTIONS
-[no]hno Print help info and quit -[no]versionno Print version info and quit -nice int 19 Set the nicelevel -r0 int 1 The first residue number in the sequence -rot0 real 0 Rotate around an angle initially (90 degrees makes sense) -T string Plot a title in the center of the wheel (must be shorter than 10 characters, or it will overwrite the wheel) -[no]nnyes Toggle numbers SEE ALSO
gromacs(7) More information about GROMACS is available at <http://www.gromacs.org/>. Mon 4 Apr 2011 g_wheel(1)
All times are GMT -4. The time now is 05:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy