Computing.Net > Forums > Solaris > need to strip hex 92 characters

need to strip hex 92 characters

Reply to Message Icon

Original Message
Name: allan
Date: November 17, 2002 at 11:23:19 Pacific
Subject: need to strip hex 92 characters
OS: solaris 2.6
CPU/Ram: sparc, 4gb
Comment:

I have 10,000 + very large xml docs (~.5m to 1m each) which contain a handful of occurrences of the character represented by hex 92 (looks like a single back-quote or something). I don't have perl on the system and was hoping to use 'tr', but can't get it to work. Anyone know how I can get 'tr' (or some other technique) to remove them? I don't need to replace them, pure deletion of just that character is fine. thanks for help.


Report Offensive Message For Removal

Response Number 1
Name: Aakash
Date: November 17, 2002 at 21:32:27 Pacific
Subject: need to strip hex 92 characters
Reply: (edit)

Looks probably you copied the files from
MS platform to UNIX platform...

apply:
# dos2unix file_input file_output

-aakash


Report Offensive Follow Up For Removal

Response Number 2
Name: John Kessinger
Date: November 20, 2002 at 07:48:36 Pacific
Subject: need to strip hex 92 characters
Reply: (edit)

"tr -d '\222' [file2]"

where \222 is octal for hex 92
[file] is the input file
[file2] is the output file

tr doesn't like to work if you just feed it in a file and then pump it right back out, you need to feed it through something like gzip/gunzip for it to work


Report Offensive Follow Up For Removal

Response Number 3
Name: John Kessinger
Date: November 20, 2002 at 07:50:33 Pacific
Subject: need to strip hex 92 characters
Reply: (edit)

tr -d '\222' lessthan [file] | gzip | gunzip greaterthan [file2]

replace lessthan with the symbol and greaterthan with the symbol, message board won't let them through


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: need to strip hex 92 characters

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software