Sponsored Content
Top Forums Shell Programming and Scripting Convert row to columns start from nth column Post 302911973 by attila on Tuesday 5th of August 2014 02:47:04 AM
Old 08-05-2014
Convert row to columns start from nth column

Dear All,

We have input like this:

Code:
       161                                 57  1378   176  1392   262  1444   441  1548   538  1611   670  1684
       241                                 57  1378   208  1393   269  1447   444  1549   538  1610   677  1700
       321                                 61  1378   197  1391   269  1448     
       401                                 72  1377   194  1389   265  1444     
       481                                 79  1377   197  1390   269  1446     
       561                                 75  1377   186  1390   269  1446

Algoritm: Convert row to columns start from 2nd to end of column

expected result:

Code:
       161                                 57   1378   
       161                                 176  1392   
       161                                 262  1444   
       161                                 441  1548   
       161                                 538  1611   
       161                                 670  1684
       241                                 57   1378   
       241                                 208  1393   
       241                                 269  1447   
       241                                 444  1549   
       241                                 538  1610   
       241                                 677  1700
       321                                 61   1378   
       321                                 197  1391   
       321                                 269  1448    
       401                                 72   1377   
       401                                 194  1389   
       401                                 265  1444    
       481                                 79   1377   
       481                                 197  1390   
       481                                 269  1446    
       561                                 75   1377   
       561                                 186  1390   
       561                                 269  1446

Thanks for advance,

Attila
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

convert matrix to row and columns

Dear Unix Gurus, I have a sample data set that looks like this y1 y2 y3 y4 y5 x1 0.3 0.5 2.3 3.1 5.1 x2 1.2 4.1 3.5 1.7 1.2 x3 3.1 2.1 1.0 4.1 2.1 x4 5.0 4.0 6.0 7.0 1.1 I want to open it up so that I get x1 y1 0.3 x2 y1 1.2 x3 y1 3.1 x4 y1 5.0 x1 y2 0.5 x2 y2... (3 Replies)
Discussion started by: tintin72
3 Replies

2. Shell Programming and Scripting

How to convert 2 column data into multiple columns based on a keyword in a row??

Hi Friends I have the following input data in 2 columns. SNo 1 I1 Value I2 Value I3 Value SNo 2 I4 Value I5 Value I6 Value I7 Value SNo 3 I8 Value I9 Value ............... ................ SNo N (1 Reply)
Discussion started by: ks_reddy
1 Replies

3. Shell Programming and Scripting

Convert columns to single row

Hello all I have data like 1 2 3 4 5 I wish my output would be like 1,2,3,4,5 For this i have executed 'BEGIN {FS="\n"; ORS=","} {print $0}' test and got the output as 1,2,3,4,5, I do not want to have , at the end of 5. output should be like (5 Replies)
Discussion started by: vasuarjula
5 Replies

4. Shell Programming and Scripting

convert a column to row output?

Getting tired of cut-and-paste...so I thought I would post a question. how do I change this column output to a single row? from this: # vgdisplay -v /dev/vgeva05 | grep dsk | awk '{print $3}' /dev/dsk/c6t0d5 /dev/dsk/c11t0d5 /dev/dsk/c15t0d5 /dev/dsk/c18t0d5 /dev/dsk/c7t0d5... (8 Replies)
Discussion started by: mr_manny
8 Replies

5. Shell Programming and Scripting

Convert row to column

Hi, I have a file like this 50 1 2 1374438 50 1 2 1682957 50 5 2 1453574 50 10 2 1985890 100 1 2 737307 100 5 2 1660204 100 10 2 2148483 and I want to convert this by... (1 Reply)
Discussion started by: gvj
1 Replies

6. UNIX for Dummies Questions & Answers

Dividing all columns by the nth row

Hi All! if I have a file like this: 8 10 12 14 16 18 0 2 6 2 4 6 8 10 12 16 18 10 6 8 12 16 18 0 2 2 6 2 2 2 2 2 2 2 2 2 10 12 16 4 8 16 4 16 0 8 10 14 16 0 4 8 12 14 And I want to divide all the lines by line 4 for example... (6 Replies)
Discussion started by: cosmologist
6 Replies

7. Shell Programming and Scripting

convert row to column with respect of first column.

Input file A.txt :- C2062 -117.6 -118.5 -117.5 C5145 0 0 0 C5696 0 0 0 Output file B.txt C2062 X -117.6 C2062 Y -118.5 C2062 Z -117.5... (4 Replies)
Discussion started by: asavaliya
4 Replies

8. Shell Programming and Scripting

Convert columns to row using awk

Hi I need to convert some columns form a html file to rows. I do manage to make it works without help (some proud :) ) For some reason the offline status is not in bold, so I do need to remove the <b> tag from the other field to make this to work. All fields are not needed, so I test and... (5 Replies)
Discussion started by: Jotne
5 Replies

9. Shell Programming and Scripting

How to convert the row to column in Perl?

Dear Perl users, Could you help me how to convert from row to column if I've a case below: Linux 2014_01_24 CPU 10 Linux 2014_01_24 MEM 20 UNIX 2014_01_24 CPU 30 UNIX 2014_01_24 MEM ... (6 Replies)
Discussion started by: askari
6 Replies

10. Shell Programming and Scripting

Convert Data from Column to Row

Hi FileA.txt E_TIM 16, ETE 15, EOND 26, EEC 81, E_1 un, E_2 un, E_3 un, E_4 284, E_TIM 17, ETE 15, EOND 29, EEC 82, E_1 un, E_2 un, E_3 un, E_4 249, (6 Replies)
Discussion started by: asavaliya
6 Replies
ISO_8859-14(7)						     Linux Programmer's Manual						    ISO_8859-14(7)

NAME
iso_8859-14 - the ISO 8859-14 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-14 encodes the characters used in Celtic languages. 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-14 Characters The following table displays the characters in ISO 8859-14, which are printable and unlisted in the ascii(7) manual page. The fourth col- umn will only show the proper glyphs in an environment configured for ISO 8859-14. Oct Dec Hex Char Description ---------------------------------------------------------------- 240 160 a0 NO-BREAK SPACE 241 161 a1 LATIN CAPITAL LETTER B WITH DOT ABOVE 242 162 a2 LATIN SMALL LETTER B WITH DOT ABOVE 243 163 a3 L POUND SIGN 244 164 a4 LATIN CAPITAL LETTER C WITH DOT ABOVE 245 165 a5 LATIN SMALL LETTER C WITH DOT ABOVE 246 166 a6 LATIN CAPITAL LETTER D WITH DOT ABOVE 247 167 a7 S SECTION SIGN 250 168 a8 LATIN CAPITAL LETTER W WITH GRAVE 251 169 a9 (C) COPYRIGHT SIGN 252 170 aa LATIN CAPITAL LETTER W WITH ACUTE 253 171 ab LATIN SMALL LETTER D WITH DOT ABOVE 254 172 ac LATIN CAPITAL LETTER Y WITH GRAVE 255 173 ad SOFT HYPHEN 256 174 ae (R) REGISTERED SIGN 257 175 af LATIN CAPITAL LETTER Y WITH DIAERESIS 260 176 b0 LATIN CAPITAL LETTER F WITH DOT ABOVE 261 177 b1 LATIN SMALL LETTER F WITH DOT ABOVE 262 178 b2 LATIN CAPITAL LETTER G WITH DOT ABOVE 263 179 b3 LATIN SMALL LETTER G WITH DOT ABOVE 264 180 b4 LATIN CAPITAL LETTER M WITH DOT ABOVE 265 181 b5 LATIN SMALL LETTER M WITH DOT ABOVE 266 182 b6 9| PILCROW SIGN 267 183 b7 LATIN CAPITAL LETTER P WITH DOT ABOVE 270 184 b8 LATIN SMALL LETTER W WITH GRAVE 271 185 b9 LATIN SMALL LETTER P WITH DOT ABOVE 272 186 ba LATIN SMALL LETTER W WITH ACUTE 273 187 bb LATIN CAPITAL LETTER S WITH DOT ABOVE 274 188 bc LATIN SMALL LETTER Y WITH GRAVE 275 189 bd LATIN CAPITAL LETTER W WITH DIAERESIS 276 190 be LATIN SMALL LETTER W WITH DIAERESIS 277 191 bf LATIN SMALL LETTER S WITH DOT ABOVE 300 192 c0 A LATIN CAPITAL LETTER A WITH GRAVE 301 193 c1 A LATIN CAPITAL LETTER A WITH ACUTE 302 194 c2 A LATIN CAPITAL LETTER A WITH CIRCUMFLEX 303 195 c3 A LATIN CAPITAL LETTER A WITH TILDE 304 196 c4 A LATIN CAPITAL LETTER A WITH DIAERESIS 305 197 c5 A LATIN CAPITAL LETTER A WITH RING ABOVE 306 198 c6 AE LATIN CAPITAL LETTER AE 307 199 c7 C LATIN CAPITAL LETTER C WITH CEDILLA 310 200 c8 E LATIN CAPITAL LETTER E WITH GRAVE 311 201 c9 E LATIN CAPITAL LETTER E WITH ACUTE 312 202 ca E LATIN CAPITAL LETTER E WITH CIRCUMFLEX 313 203 cb E LATIN CAPITAL LETTER E WITH DIAERESIS 314 204 cc I LATIN CAPITAL LETTER I WITH GRAVE 315 205 cd I LATIN CAPITAL LETTER I WITH ACUTE 316 206 ce I LATIN CAPITAL LETTER I WITH CIRCUMFLEX 317 207 cf I LATIN CAPITAL LETTER I WITH DIAERESIS 320 208 d0 LATIN CAPITAL LETTER W WITH CIRCUMFLEX 321 209 d1 N LATIN CAPITAL LETTER N WITH TILDE 322 210 d2 O LATIN CAPITAL LETTER O WITH GRAVE 323 211 d3 O LATIN CAPITAL LETTER O WITH ACUTE 324 212 d4 O LATIN CAPITAL LETTER O WITH CIRCUMFLEX 325 213 d5 O LATIN CAPITAL LETTER O WITH TILDE 326 214 d6 O LATIN CAPITAL LETTER O WITH DIAERESIS 327 215 d7 LATIN CAPITAL LETTER T WITH DOT ABOVE 330 216 d8 O LATIN CAPITAL LETTER O WITH STROKE 331 217 d9 U LATIN CAPITAL LETTER U WITH GRAVE 332 218 da U LATIN CAPITAL LETTER U WITH ACUTE 333 219 db U LATIN CAPITAL LETTER U WITH CIRCUMFLEX 334 219 dc U LATIN CAPITAL LETTER U WITH DIAERESIS 335 220 dd Y LATIN CAPITAL LETTER Y WITH ACUTE 336 221 de LATIN CAPITAL LETTER Y WITH CIRCUMFLEX 337 222 df B LATIN SMALL LETTER SHARP S 340 223 e0 a LATIN SMALL LETTER A WITH GRAVE 341 224 e1 a LATIN SMALL LETTER A WITH ACUTE 342 225 e2 a LATIN SMALL LETTER A WITH CIRCUMFLEX 343 226 e3 a LATIN SMALL LETTER A WITH TILDE 344 227 e4 a LATIN SMALL LETTER A WITH DIAERESIS 345 228 e5 a LATIN SMALL LETTER A WITH RING ABOVE 346 229 e6 ae LATIN SMALL LETTER AE 347 230 e7 c LATIN SMALL LETTER C WITH CEDILLA 350 231 e8 e LATIN SMALL LETTER E WITH GRAVE 351 232 e9 e LATIN SMALL LETTER E WITH ACUTE 352 233 ea e LATIN SMALL LETTER E WITH CIRCUMFLEX 353 234 eb e LATIN SMALL LETTER E WITH DIAERESIS 354 235 ec i LATIN SMALL LETTER I WITH GRAVE 355 236 ed i LATIN SMALL LETTER I WITH ACUTE 356 237 ee i LATIN SMALL LETTER I WITH CIRCUMFLEX 357 238 ef i LATIN SMALL LETTER I WITH DIAERESIS 360 239 f0 LATIN SMALL LETTER W WITH CIRCUMFLEX 361 240 f1 n LATIN SMALL LETTER N WITH TILDE 362 241 f2 o LATIN SMALL LETTER O WITH GRAVE 363 242 f3 o LATIN SMALL LETTER O WITH ACUTE 364 243 f4 o LATIN SMALL LETTER O WITH CIRCUMFLEX 365 244 f5 o LATIN SMALL LETTER O WITH TILDE 366 245 f6 o LATIN SMALL LETTER O WITH DIAERESIS 367 246 f7 LATIN SMALL LETTER T WITH DOT ABOVE 370 247 f8 o LATIN SMALL LETTER O WITH STROKE 371 248 f9 u LATIN SMALL LETTER U WITH GRAVE 372 249 fa u LATIN SMALL LETTER U WITH ACUTE 373 250 fb u LATIN SMALL LETTER U WITH CIRCUMFLEX 374 251 fc u LATIN SMALL LETTER U WITH DIAERESIS 375 252 fd y LATIN SMALL LETTER Y WITH ACUTE 376 253 fe LATIN SMALL LETTER Y WITH CIRCUMFLEX 377 254 ff y LATIN SMALL LETTER Y WITH DIAERESIS NOTES
ISO 8859-14 is also known as Latin-8. 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-15 ISO_8859-14(7)
All times are GMT -4. The time now is 08:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy