Sponsored Content
Top Forums Shell Programming and Scripting Arrange / format data using awk Post 302501394 by greycells on Thursday 3rd of March 2011 11:56:57 AM
Old 03-03-2011
Arrange / format data using awk

Input

Code:
 
217:fngadi4osa:fngadi4osa:M 217:415744:N/A
227:fngadi4osa:fngadi4osa: M 227:51200:N/A
228:fngadi4osa:fngadi4osa: M 228:102400:N/A
65:sapgt04:sapgt04: M 65:104448:N/A
228:fngadi4osa:fngadi4oma: M 228:102400:N/A

Output

Code:
 
217:fngadi4osa:fngadi4osa:M 217:415744:N/A
227:fngadi4osa:fngadi4osa: M 227:51200:N/A
228:fngadi4osa:fngadi4osa: M 228:102400:N/A
228:fngadi4osa:fngadi4oma: M 228:102400:N/A
 
65:sapgt04:sapgt04: M 65:104448:N/A


Basically i want to arrange/couple data by a column x .. say in this case its column 3 and have a space between each set -- thx
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

data format from (4.56 0.7) -> 4.6(7) awk?!

Hi, I have to manipulate a data file which say reads like this {$index $value $error_on_value} aa 4.56 0.7 bb 123.456 0.00987 cc 987654 321 . . in easily human readable format of type aa 4.6(7) bb 123.456(1) cc 9.877(3)e+05 value rounded to 4.6 with error of 0.7 on the last... (4 Replies)
Discussion started by: ahan
4 Replies

2. Shell Programming and Scripting

re arrange data

Any idea in awk or sed? $cat file a b c 2 4 5 6 output: a b c 2 4 5 6 (3 Replies)
Discussion started by: kenshinhimura
3 Replies

3. Shell Programming and Scripting

arrange data tools

Which is the best command(s) to arrange data of a file? This is my example input file: Tom ------ apples: 5 oranges: 7 pears: 10 apples: 2 oranges: 8 Jack ------ apples: 3 pears: 10 Lucy ------ oranges: 1 pears: 8 peaches: 9 Tom ------ peaches: 1 Jack ------ (1 Reply)
Discussion started by: csecnarf
1 Replies

4. Shell Programming and Scripting

Format & re-arrange the records

Data on my input file : Ac1n1s1c2n2s2XPd1r1e1t1d2r2e2t2d3r3e3t3d4r4e4t4RT Bh1k1p1h2k2p2NTq1y1f1m1q2y2f2m2q3y3f3m3q4y4f4m4ZN and i want the output to be: Ac1n1s1XPd1r1e1t1RT Ac1n1s1XPd2r2e2t2RT Ac1n1s1XPd3r3e3t3RT Ac1n1s1XPd4r4e4t4RT Ac2n2s2XPd1r1e1t1RT Ac2n2s2XPd2r2e2t2RT... (6 Replies)
Discussion started by: rlmadhav
6 Replies

5. UNIX for Dummies Questions & Answers

Arrange data

I have a following data: 100 200 300 400 I want the data to be arranged: 100 200 300 400 What is the best way to do this? Thanks! (5 Replies)
Discussion started by: bobo
5 Replies

6. Shell Programming and Scripting

script to arrange file in specific format

Hi All, I am new to forum, I am looking to arrange a file in specific format but unable to get the formula to do it, already googled for the same, but didnt find the answer :(. hope to get help here :o:o:o:o:o I have to files : $ cat Dev_List2 0685 0686 0687 0688 0689 068A 068B 068C... (2 Replies)
Discussion started by: prasan_Aix
2 Replies

7. Programming

Arrange word in table metrix format

Hello everyone, I have some problem about this code : #!/usr/bin/env python import sys try : filename = sys.argv except : print 'Specify filename' sys.exit() fd = open(filename) lines = fd.xreadlines() compare = {} for line in lines : split_line =... (1 Reply)
Discussion started by: awil
1 Replies

8. Shell Programming and Scripting

Arrange data in table

Hello All, I have following data into my file named record. Name City phone number email Jhon Newyork 123456987 jhon@gmail.com Maria Texas 569865612 Maria_Sweet@rediffmail.com Chan Durben NA Chan123@gmail.com |---------------------------------------------------------------| |Name ... (2 Replies)
Discussion started by: Nakul_sh
2 Replies

9. Shell Programming and Scripting

Arrange data in table

Hello All, I have following data into my file named record. Name City phone number email Jhon Newyork 123456987 jhon@gmail.com Maria Texas 569865612 Maria_Sweet@rediffmail.com Chan Durben NA Chan123@gmail.com The output should be in straight columns.. There should not be any... (1 Reply)
Discussion started by: Nakul_sh
1 Replies

10. Shell Programming and Scripting

Format Data - awk ..

/clusters/cluster-1/exports/storage-views/M1_CRE03_SV: Name Value ------------------------ --------------------------------------------------------------------------------------------------- caw-enabled true controller-tag - initiators ... (7 Replies)
Discussion started by: greycells
7 Replies
ISO_8859-6(7)						     Linux Programmer's Manual						     ISO_8859-6(7)

NAME
iso_8859-6 - the 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 223 e0 ARABIC TATWEEL 341 224 e1 ARABIC LETTER FEH 342 225 e2 ARABIC LETTER QAF 343 226 e3 ARABIC LETTER KAF 344 227 e4 ARABIC LETTER LAM 345 228 e5 ARABIC LETTER MEEM 346 229 e6 ARABIC LETTER NOON 347 230 e7 ARABIC LETTER HEH 350 231 e8 ARABIC LETTER WAW 351 232 e9 ARABIC LETTER ALEF MAKSURA 352 233 ea ARABIC LETTER YEH 353 234 eb ARABIC FATHATAN 354 235 ec ARABIC DAMMATAN 355 236 ed ARABIC KASRATAN 356 237 ee ARABIC FATHA 357 238 ef ARABIC DAMMA 360 239 f0 ARABIC KASRA 361 240 f1 ARABIC SHADDA 362 241 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.25 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 2009-01-27 ISO_8859-6(7)
All times are GMT -4. The time now is 05:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy