Sponsored Content
Full Discussion: How to decode text files?
Top Forums Shell Programming and Scripting How to decode text files? Post 302762729 by Akshay Hegde on Tuesday 29th of January 2013 02:42:53 AM
Old 01-29-2013
How to decode text files?

HI experts....I am trying to decode some text files... I need little help from you people...file is of mixed type...from generated from windows based system

my text files looks like this...

Code:
2.AUBZ               158   1 11 116204310 6 N 7542 E       18
    02846    52833   102821   152815   202824   252812   302804   352825   402809
   452774   502759   552727   602712   652699   702685   752655   802603   852539
  2.AUCE                50  39 12 12314 453 0 S 5730 E      130
    0 374    5 374   10 375   15 375   20 375   25 374   30 373   35 373   40 371
   45 376   50 376   55 366   60 370   65 366   70 362   75 359   80 358   85 358
   90 354   95 354  100 319  105 262  110 243  115 233  120 226  125 220  130 217
  135 209  140 200  145 198  150 199  155 196  160 197  165 198  170 201  175 205
  180 207  185 211  190 215  195 217  200 218  205 217  210 218  215 217  220 218
  225 230  230 225  235 232  240 227  245 224  250 226  255 229  260 228  265 230
  270 234  275 237  280 239  285 237  290 241  295 242  300 240  305 239  310 239
  315 239  320 238  325 239  330 239  335 241  340 241  345 241  350 239  355 239

I want to print like this


Code:
2    AUBZ    158    1    11    1162043        10 6N    7542E    18    0    28.46
2    AUBZ    158    1    11    1162043        10 6N    7542E    18    5    28.33    
2    AUCE    50    39    12    12314 4     53 0S    5730E    130    0      37.4
2    AUCE    50    39    12    12314 4        53 0S    5730E    130    5    37.4                                            
2    AUCE    50    39    12    12314 4        53 0S    5730E    130    355    23.9


Last edited by Akshay Hegde; 01-29-2013 at 03:46 AM.. Reason: to attach sample file
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please decode in English

Hello: Can anyone please decode this script in English. I have also made some comments which I know.. The actual script does not have one comment also.. #! /bin/ksh . odbmsprd_env.ksh #setting the env.. echo $0 Started at : `date '+%d-%m-%Y %H:%M:%S'` # what's echo $0 ... (4 Replies)
Discussion started by: ST2000
4 Replies

2. Shell Programming and Scripting

Decode email

In pine email, when you receive an email with an attachment, the content of the attachment is incoded (content-transfer-encoding: base64). I am trying to write a shell script that will read the mail file, and it will save the attachment of an email to a directory. I want to do this by reading... (6 Replies)
Discussion started by: mskarica
6 Replies

3. Shell Programming and Scripting

auto decode a value to different value

Okay, This is not something I've tried to do before, but what I want (need) to do is when a value is read in it gets changed to the value needed. I've been given a list of ids that I need to check against the ids I have in my system, but as is the case we don't have the same naming convention... (2 Replies)
Discussion started by: nhatch
2 Replies

4. Programming

Help to decode in perl script

Hi, I am having a file in below stucture: header { subheader1 { field1 : value field2 : value field3: value } //end of subheader1 subheader2 { subheader3 { field4 : value field5 : value field6: value } subheader4 (6 Replies)
Discussion started by: kallol
6 Replies

5. Programming

How to Decode an image using openGL

Hi, How to decode an image using openGL library libjpeg .. which are the steps needed to do this using C language.. actually my work is to decode the image, store it on the buffer, and place it on cube surface.. please guide me,,any answer will appreciated .. (8 Replies)
Discussion started by: Ravikishore
8 Replies

6. Linux

Decode the statement!!

What will the below statement do ?:confused: && { && {eval `/bin/setup 1`} || && { VAR="/tmp" } export $VAR; } (3 Replies)
Discussion started by: krishnaux
3 Replies

7. AIX

How to decompile or decode an executable?

I have a file type of: executable (RISC System/6000 V3.1) or obj module not stripped How can I decode it? I know that this may be somewhat involved, but if you could steer me in the right direction, I would appreciate it. Thanks! (2 Replies)
Discussion started by: gg48gg
2 Replies

8. UNIX for Dummies Questions & Answers

What does this command do? and how to decode all other lines

Hello, I have an encoded file and I wish to see what is written inside. The first line is given below: eval "$(dd if=$0 bs=1 skip=69 2>/dev/null|gpg -d 2>/dev/null)"; exit PS: When I google above code, it says that command is use for encryption... Following lines include many strange... (2 Replies)
Discussion started by: baris35
2 Replies

9. Windows & DOS: Issues & Discussions

Decode windows .dat file

I have received a file from a Windows server that in Linux hexedit shows the following first few characters. AA 18 3C 2B 60 56 03 00 00 01 01 00 The Windows program may have received this via RS232. I need to "understand" this on a Linux machine. Please suggest where I may start decoding... (4 Replies)
Discussion started by: Alf Stockton
4 Replies

10. UNIX for Beginners Questions & Answers

Decode a file

hi i have this file : <?xml version="1.0" encoding="UTF-8"?> <OnDemand xmlns="http://xsd.telecomitalia.it/Schema/crmws.entity.OnDemand" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xsd.telecomitalia.it/Schema/crmws.entity.OnDemand... (2 Replies)
Discussion started by: Francesco_IT
2 Replies
iconv_pc_cyr(5)                                         Standards, Environments, and Macros                                        iconv_pc_cyr(5)

NAME
iconv_pc_cyr - code set conversion tables for Alternative PC Cyrillic DESCRIPTION
The following code set conversions are supported: +---------------------------------------------------------------------+ | Code Set Conversions Supported | +--------------+--------+--------------+--------+---------------------+ | Code |Symbol |Target Code |Symbol | Target Output | +--------------+--------+--------------+--------+---------------------+ |PC Cyrillic |alt |ISO 8859-5 |iso5 | ISO 8859-5 Cyrillic | +--------------+--------+--------------+--------+---------------------+ |PC Cyrillic |alt |KOI8-R |koi8 | KOI8-R | +--------------+--------+--------------+--------+---------------------+ |PC Cyrillic |alt |MS 1251 |win5 | Windows Cyrillic | +--------------+--------+--------------+--------+---------------------+ |PC Cyrillic |alt |Mac Cyrillic |mac | Macintosh Cyrillic | +--------------+--------+--------------+--------+---------------------+ CONVERSIONS
The conversions are performed according to the following tables. All values in the tables are given in octal. PC Cyrillic to ISO 8859-5 For the conversion of PC Cyrillic to ISO 8859-5, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | PC Cyrillic | ISO 8859-5 | PC Cyrillic | ISO 8859-5 | |24 | 4 |231 |311 | |200 | 260 |232 |312 | |201 | 261 |233 |313 | |202 | 262 |234 |314 | |203 | 263 |235 |315 | |204 | 264 |236 |316 | |205 | 265 |237 |317 | |206 | 266 |240 |320 | |207 | 267 |241 |321 | |210 | 270 |242 |322 | |211 | 271 |243 |323 | |212 | 272 |244 |324 | |213 | 273 |245 |325 | |214 | 274 |246 |326 | |215 | 275 |247 |327 | |216 | 276 |250 |330 | |217 | 277 |251 |331 | |220 | 300 |252 |332 | |221 | 301 |253 |333 | |222 | 302 |254 |334 | |223 | 303 |255 |335 | |224 | 304 |256 |336 | |225 | 305 |257 |337 | |226 | 306 |260-337 |255 | |227 | 307 |360 |241 | |230 | 310 |362-376 |255 | +---------------+----------------+----------------+---------------+ PC Cyrillic to KOI8-R For the conversion of PC Cyrillic to KOI8-R, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | PC Cyrillic | KOI8-R | PC Cyrillic | KOI8-R | |24 | 4 |242 |327 | |200 | 341 |243 |307 | |201 | 342 |244 |304 | |202 | 367 |245 |305 | |203 | 347 |246 |326 | |204 | 344 |247 |332 | |205 | 345 |250 |311 | |206 | 366 |251 |312 | |207 | 372 |252 |313 | |210 | 351 |253 |314 | |211 | 352 |254 |315 | |212 | 353 |255 |316 | |213 | 354 |256 |317 | |214 | 355 |257 |320 | |215 | 356 |260-337 |255 | |216 | 357 |340 |322 | |217 | 360 |341 |323 | |220 | 362 |342 |324 | |221 | 363 |343 |325 | |222 | 364 |344 |306 | |223 | 365 |345 |310 | |224 | 346 |346 |303 | |225 | 350 |347 |336 | |226 | 343 |350 |333 | |227 | 376 |351 |335 | |230 | 373 |352 |337 | |231 | 375 |353 |331 | |232 | 377 |354 |330 | |233 | 371 |355 |334 | |234 | 370 |356 |300 | |235 | 374 |357 |321 | |236 | 340 |360 |263 | |237 | 361 |361 |243 | |240 | 301 |362-376 |255 | |241 | 302 | | | +---------------+----------------+----------------+---------------+ PC Cyrillic to MS 1251 For the conversion of PC Cyrillic to MS 1251, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | PC Cyrillic | MS 1251 | PC Cyrillic | MS 1251 | |24 | 4 |242 |342 | |200 | 300 |243 |343 | |201 | 301 |244 |344 | |202 | 302 |245 |345 | |203 | 303 |246 |346 | |204 | 304 |247 |347 | |205 | 305 |250 |350 | |206 | 306 |251 |351 | |207 | 307 |252 |352 | |210 | 310 |253 |353 | |211 | 311 |254 |354 | |212 | 312 |255 |355 | |213 | 313 |256 |356 | |214 | 314 |257 |357 | |215 | 315 |260-337 |210 | |216 | 316 |340 |360 | |217 | 317 |341 |361 | |220 | 320 |342 |362 | |221 | 321 |343 |363 | |222 | 322 |344 |364 | |223 | 323 |345 |365 | |224 | 324 |346 |366 | |225 | 325 |347 |367 | |226 | 326 |350 |370 | |227 | 327 |351 |371 | |230 | 330 |352 |372 | |231 | 331 |353 |373 | |232 | 332 |354 |374 | |233 | 333 |355 |375 | |234 | 334 |356 |376 | |235 | 335 |357 |377 | |236 | 336 |360 |250 | |237 | 337 |361 |270 | |240 | 340 |362-376 |210 | |241 | 341 | | | +---------------+----------------+----------------+---------------+ PC Cyrillic to Mac Cyrillic For the conversion of PC Cyrillic to Mac Cyrillic, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | PC Cyrillic | Mac Cyrillic | PC Cyrillic | Mac Cyrillic | |24 | 4 |341 |361 | |240 | 340 |342 |362 | |241 | 341 |343 |363 | |242 | 342 |344 |364 | |243 | 343 |345 |365 | |244 | 344 |346 |366 | |245 | 345 |347 |367 | |246 | 346 |350 |370 | |247 | 347 |351 |371 | |250 | 350 |352 |372 | |251 | 351 |353 |373 | |252 | 352 |354 |374 | |253 | 353 |355 |375 | |254 | 354 |356 |376 | |255 | 355 |357 |337 | |256 | 356 |360 |335 | |257 | 357 |361 |336 | |260-337 | 40 |362-376 |40 | |340 | 360 | | | +---------------+----------------+----------------+---------------+ FILES
/usr/lib/iconv/*.so conversion modules /usr/lib/iconv/*.t conversion tables /usr/lib/iconv/iconv_data list of conversions supported by conversion tables SEE ALSO
iconv(1), iconv(3C), iconv(5) SunOS 5.10 18 Apr 1997 iconv_pc_cyr(5)
All times are GMT -4. The time now is 08:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy