Sponsored Content
Top Forums Shell Programming and Scripting Remove interspersed headers in .dat file with AWK Post 302546076 by gd9629 on Wednesday 10th of August 2011 10:30:24 AM
Old 08-10-2011
Using the same concept, I need to remove 6 lines of a data frame and those interspersed throughout.

Code:
10 May 2011 Created: 10 May 11 15:05 GMT Scale: SIO-2005 and others
GC-MD, Cape Grim, Tasmania, Lat.: 40.68S, Lon.: 144.69E, Alt: 94m above sea level
You can use the following format in Fortran to read data in different columns, (F10.5, 2I4,I6, 2I4,I6,1X,10(F10.3,a1))
    scale:  --  --    --  --  --    --     SIO-05     SIO-05     SIO-05     SIO-05     SIO-98     SIO-05 Tohoku-Uni     SIO-98    CSIRO94    CSIRO94
     unit:  --  --    --  --  --    --        ppt        ppt        ppt        ppt        ppb        ppt        ppb        ppt        ppb        ppb
      time  DD  MM  YYYY  hh min ABSDA     CFC-11     CFC-12    CH3CCl3       CCl4        N2O    CFC-113        CH4      CHCl3         CO         H2
2010.00004   1   1  2010   0  23 11628    239.925    533.582      8.181     86.203    322.195     75.690   1736.198      4.644     35.280    529.335 
2010.00012   1   1  2010   1   3 11628    239.436    533.013      8.224     86.178    321.900     75.496   1735.882      4.892     34.441    527.677 
2010.00020   1   1  2010   1  43 11628    239.884    533.140      7.948     85.851    322.215     75.451   1736.369      4.557     34.916    531.719 
2010.00027   1   1  2010   2  23 11628    239.977    533.657      8.383     86.410    322.339     75.445   1736.773      4.598     34.633    527.731 
2010.00035   1   1  2010   3   3 11628    239.687    533.042      8.032     86.418    322.198     75.405   1735.862      4.534     32.125    527.888 
2010.00042   1   1  2010   3  43 11628    239.733    533.058      7.837     86.113    322.212     75.436   1736.022      4.831     33.056    527.984

i.e. just remove all text bar the first 6 lines at the very top of the concatenated file
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help:how to remove headers in output file

Hi I am running a script (which compares two directory contents) for which I am getting an output of 70 pages in which few pages are blank so I was able to delete those blank lines. But I also want to delete the headers present for each page. can any one help me by providing the code... (1 Reply)
Discussion started by: raj_thota
1 Replies

2. Shell Programming and Scripting

Remove Headers throughout a data file

I have a data file with over 500,000 records/lines that has the header throughout the file. SEQ_ID Name Start_Date Ins_date Add1 Add2 1 Harris 04/02/08 03/02/08 333 Main Suite 101 2 Smith 02/03/08 01/23/08 287 Jenkins SEQ_ID Name ... (3 Replies)
Discussion started by: psmall
3 Replies

3. Shell Programming and Scripting

Remove text between headers while leaving headers intact

Hi, I'm trying to strip all lines between two headers in a file: ### BEGIN ### Text to remove, contains all kinds of characters ... Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c om/updates/ Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies

4. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

5. Shell Programming and Scripting

How to pull info under headers in file(awk,grep,while loop)

below is an extract from my file and I am trying to use Awk and grep and a while loop to pull infomation from under neath "HBA WWN=".HBA WWN=" reoccurs all over the file but the 100000c.....number are unique and I want to be able to pull and reference specifi information under this header ever time... (2 Replies)
Discussion started by: kieranfoley
2 Replies

6. Shell Programming and Scripting

Filter/remove duplicate .dat file with certain criteria

I am a beginner in Unix. Though have been asked to write a script to filter(remove duplicates) data from a .dat file. File is very huge containig billions of records. contents of file looks like 30002157,40342424,OTC,mart_rec,100, ,0 30002157,40343369,OTC,mart_rec,95, ,0... (6 Replies)
Discussion started by: mukeshguliao
6 Replies

7. Shell Programming and Scripting

How to remove duplicates from the .dat file

All, I have a file 1181CUSTOMER-L061411_003500.dat.Z having duplicate records in it. bash-2.05$ zcat 1181CUSTOMER-L061411_003500.dat.Z|grep "90876251S" 90876251S|ABG, AN ADAYANA COMPANY|3550 DEPAUW BLVD|||US|IN|INDIANAPOLIS||DAL|46268||||||GEN|||||||USD|||ABG, AN ADAYANA... (3 Replies)
Discussion started by: Oracle_User
3 Replies

8. UNIX for Dummies Questions & Answers

Using sed command to remove multiple instances of repeating headers in one file?

Hi, I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
Discussion started by: rebazon
1 Replies

9. Shell Programming and Scripting

Remove <CR><LF> from the dat file in unix

Hi, The source system has created the file in the dat format and put into the linux directory as mentioned below. I want to do foloowing things. a) Delete the Line started with <CR><LF> in the record b)Also line ...........................................................<CR><LF> ... (1 Reply)
Discussion started by: mr_harish80
1 Replies

10. Shell Programming and Scripting

awk command on .DAT file not working?

Hi All, I am trying to run awk command on .DAT file and it is not working. The same command is working on .txt file: Contents of the file ZZ_55555555_444444_ZZZZZZ_7777777_888_99.DAT: HEADER|ZZ_55555555_444444_ZZZZZZ_7777777_888_99.DAT... (10 Replies)
Discussion started by: sagar.cumar
10 Replies
ISO_8859-6(7)						     Linux Programmer's Manual						     ISO_8859-6(7)

NAME
iso_8859-6 - ISO 8859-6 character set encoded in octal, decimal, and hexadecimal DESCRIPTION
The ISO 8859 standard includes several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). ISO 8859-6 encodes the characters used in the Arabic language. ISO 8859 alphabets The full set of ISO 8859 alphabets includes: ISO 8859-1 West European languages (Latin-1) ISO 8859-2 Central and East European languages (Latin-2) ISO 8859-3 Southeast European and miscellaneous languages (Latin-3) ISO 8859-4 Scandinavian/Baltic languages (Latin-4) ISO 8859-5 Latin/Cyrillic ISO 8859-6 Latin/Arabic ISO 8859-7 Latin/Greek ISO 8859-8 Latin/Hebrew ISO 8859-9 Latin-1 modification for Turkish (Latin-5) ISO 8859-10 Lappish/Nordic/Eskimo languages (Latin-6) ISO 8859-11 Latin/Thai ISO 8859-13 Baltic Rim languages (Latin-7) ISO 8859-14 Celtic (Latin-8) ISO 8859-15 West European languages (Latin-9) ISO 8859-16 Romanian (Latin-10) ISO 8859-6 characters The following table displays the characters in ISO 8859-6, which are printable and unlisted in the ascii(7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-6. Oct Dec Hex Char Description ------------------------------------------------------------- 240 160 A0 NO-BREAK SPACE 244 164 A4 x CURRENCY SIGN 254 172 AC ARABIC COMMA 255 173 AD SOFT HYPHEN 273 187 BB ARABIC SEMICOLON 277 191 BF ARABIC QUESTION MARK 301 193 C1 ARABIC LETTER HAMZA 302 194 C2 ARABIC LETTER ALEF WITH MADDA ABOVE 303 195 C3 ARABIC LETTER ALEF WITH HAMZA ABOVE 304 196 C4 ARABIC LETTER WAW WITH HAMZA ABOVE 305 197 C5 ARABIC LETTER ALEF WITH HAMZA BELOW 306 198 C6 ARABIC LETTER YEH WITH HAMZA ABOVE 307 199 C7 ARABIC LETTER ALEF 310 200 C8 ARABIC LETTER BEH 311 201 C9 ARABIC LETTER TEH MARBUTA 312 202 CA ARABIC LETTER TEH 313 203 CB ARABIC LETTER THEH 314 204 CC ARABIC LETTER JEEM 315 205 CD ARABIC LETTER HAH 316 206 CE ARABIC LETTER KHAH 317 207 CF ARABIC LETTER DAL 320 208 D0 ARABIC LETTER THAL 321 209 D1 ARABIC LETTER REH 322 210 D2 ARABIC LETTER ZAIN 323 211 D3 ARABIC LETTER SEEN 324 212 D4 ARABIC LETTER SHEEN 325 213 D5 ARABIC LETTER SAD 326 214 D6 ARABIC LETTER DAD 327 215 D7 ARABIC LETTER TAH 330 216 D8 ARABIC LETTER ZAH 331 217 D9 ARABIC LETTER AIN 332 218 DA ARABIC LETTER GHAIN 340 224 E0 ARABIC TATWEEL 341 225 E1 ARABIC LETTER FEH 342 226 E2 ARABIC LETTER QAF 343 227 E3 ARABIC LETTER KAF 344 228 E4 ARABIC LETTER LAM 345 229 E5 ARABIC LETTER MEEM 346 230 E6 ARABIC LETTER NOON 347 231 E7 ARABIC LETTER HEH 350 232 E8 ARABIC LETTER WAW 351 233 E9 ARABIC LETTER ALEF MAKSURA 352 234 EA ARABIC LETTER YEH 353 235 EB ARABIC FATHATAN 354 236 EC ARABIC DAMMATAN 355 237 ED ARABIC KASRATAN 356 238 EE ARABIC FATHA 357 239 EF ARABIC DAMMA 360 240 F0 ARABIC KASRA 361 241 F1 ARABIC SHADDA 362 242 F2 ARABIC SUKUN NOTES
ISO 8859-6 lacks the glyphs required for many related languages, such as Urdu and Persian (Farsi). SEE ALSO
ascii(7) COLOPHON
This page is part of release 3.55 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-09-20 ISO_8859-6(7)
All times are GMT -4. The time now is 03:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy