Hex value search in a csv


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Hex value search in a csv
# 1  
Old 07-02-2010
Hex value search in a csv

I have looked at other posts on this and cannot get what I need,

I have a csv file (UTF -8) that has corrupt data in:

"p.fażżżż","ażżża","","","",""

The hex value for the upside down ? is a C2BF

How can I search a csv file for this hex value C2BF

Any help would be appreciated

Thanks

Last edited by Pablo_beezo; 07-02-2010 at 09:11 AM..
# 2  
Old 07-02-2010
The upside-down characters you have posted are Octal 277 = Hex BF .

To find each line containing that character:

Code:
SEARCH=`echo "\0277\c"
grep "${SEARCH}" filename

Some packages use that symbol to mean undisplayable character.

If it doesn't find the characters please post the output from this command on one bad record.

Code:
sed -n l file_containing_bad_record

# 3  
Old 07-02-2010
thanks fro your help
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

CSV File with Multiple Search Parameter

Dear Team Members, I have a unique problem. Below is the dataset which I have. I am writing a script which will read through the file and pull the invoice no. (Field 2 of C1 row). "C1",990001,"L1","HERO","MOTORCYCLE","ASIA-PACIFIC","BEIJING" "C2","CLUTCH","HYUNDAI",03032017... (13 Replies)
Discussion started by: chetanojha
13 Replies

2. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

3. Shell Programming and Scripting

Search and store value from .csv

Dear All, I am using the command to find the value from path DYMV_STD_NAME=$( echo $file | sed 's#.*/*_\(*\).*#\1#' ) file = RRK11234_RKY5807_SRY000_HOME_20071010.zip It give me value DYMV_STD_NAME = RKY5807 Now i have flat as below The contect of the file would be as below. ... (1 Reply)
Discussion started by: yadavricky
1 Replies

4. Shell Programming and Scripting

Compare Hex Value from CSV File

I have a one CSV File Contain Hex Value here is a sample file 6300, 0x0, 0x60d0242c6, , 0x728e5806, unnamedImageEntryPoint_0x728e5806, 0x728e$ 6300, 0x0, 0x60d024c52, , 0x728e8cb7, unnamedImageEntryPoint_0x728e8cb7, 0x728e$ 6300, 0x0, 0x60d025638, , 0x728e82da,... (2 Replies)
Discussion started by: rakesh_arxmind
2 Replies

5. Shell Programming and Scripting

awk read column csv and search in other csv

hi, someone to know how can i read a specific column of csv file and search the value in other csv columns if exist the value in the second csv copy entire row with all field in a new csv file. i suppose that its possible using awk but i m not expertise thanks in advance (8 Replies)
Discussion started by: giankan
8 Replies

6. Shell Programming and Scripting

Perl search csv fileA where two strings exist on another csv fileB

Hi I have two csv files, with the following formats: FileA.log: Application, This occured blah Application, That occured blah Application, Also this AnotherLog, Bob did this AnotherLog, Dave did that FileB.log: Uk, London, Application, datetime, LaterDateTime, Today it had'nt... (8 Replies)
Discussion started by: PerlNewbRP
8 Replies

7. Shell Programming and Scripting

search and replace in csv file

I have csv file where I want the second column has to be replaced with value 1. Source file 919568760477,1,2011-07-11T22:34:27.000+05:30, 919557735692,2,2011-07-11T22:36:16.000+05:30, 917417384969,2,2011-07-11T22:33:26.000+05:30, Final file ... (30 Replies)
Discussion started by: dondilip
30 Replies

8. Shell Programming and Scripting

Help search and replace hex values only in specific files

perl -pi -e 's/\x00/\x0d\x0a/g' `grep -l $'GS' filelist` This isn't working :confused:, it's not pulling the files that contain the regex. Please help me rewrite this :wall:. Ideally for this to work on 9K of 20K files in the directory, I've tried this but I don't know enough about awk... (7 Replies)
Discussion started by: verge
7 Replies

9. Programming

What is the difference between ios::hex and std::hex?

Hi, Is there really a difference between these two, std::hex and ios::hex?? I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true? Thanks (0 Replies)
Discussion started by: royalibrahim
0 Replies

10. Programming

After converting the hexstr to Hex and storing the Hex in a char*

Hi All, My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ',' This has to be done for all the hexstring char* is NULL. Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Discussion started by: rvan
1 Replies
Login or Register to Ask a Question