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-5(7)						     Linux Programmer's Manual						     ISO_8859-5(7)

NAME
iso_8859-5 - ISO 8859-5 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-5 encodes the Cyrillic characters used in many East European 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-5 characters The following table displays the characters in ISO 8859-5 that are printable and unlisted in the ascii(7) manual page. Oct Dec Hex Char Description ------------------------------------------------------------------------ 240 160 A0 NO-BREAK SPACE 241 161 A1 CYRILLIC CAPITAL LETTER IO 242 162 A2 CYRILLIC CAPITAL LETTER DJE 243 163 A3 CYRILLIC CAPITAL LETTER GJE 244 164 A4 CYRILLIC CAPITAL LETTER UKRAINIAN IE 245 165 A5 CYRILLIC CAPITAL LETTER DZE 246 166 A6 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I 247 167 A7 CYRILLIC CAPITAL LETTER YI 250 168 A8 CYRILLIC CAPITAL LETTER JE 251 169 A9 CYRILLIC CAPITAL LETTER LJE 252 170 AA CYRILLIC CAPITAL LETTER NJE 253 171 AB CYRILLIC CAPITAL LETTER TSHE 254 172 AC CYRILLIC CAPITAL LETTER KJE 255 173 AD SOFT HYPHEN 256 174 AE CYRILLIC CAPITAL LETTER SHORT U 257 175 AF CYRILLIC CAPITAL LETTER DZHE 260 176 B0 CYRILLIC CAPITAL LETTER A 261 177 B1 CYRILLIC CAPITAL LETTER BE 262 178 B2 CYRILLIC CAPITAL LETTER VE 263 179 B3 CYRILLIC CAPITAL LETTER GHE 264 180 B4 CYRILLIC CAPITAL LETTER DE 265 181 B5 CYRILLIC CAPITAL LETTER IE 266 182 B6 CYRILLIC CAPITAL LETTER ZHE 267 183 B7 CYRILLIC CAPITAL LETTER ZE 270 184 B8 CYRILLIC CAPITAL LETTER I 271 185 B9 CYRILLIC CAPITAL LETTER SHORT I 272 186 BA CYRILLIC CAPITAL LETTER KA 273 187 BB CYRILLIC CAPITAL LETTER EL 274 188 BC CYRILLIC CAPITAL LETTER EM 275 189 BD CYRILLIC CAPITAL LETTER EN 276 190 BE CYRILLIC CAPITAL LETTER O 277 191 BF CYRILLIC CAPITAL LETTER PE 300 192 C0 CYRILLIC CAPITAL LETTER ER 301 193 C1 CYRILLIC CAPITAL LETTER ES 302 194 C2 CYRILLIC CAPITAL LETTER TE 303 195 C3 CYRILLIC CAPITAL LETTER U 304 196 C4 CYRILLIC CAPITAL LETTER EF 305 197 C5 CYRILLIC CAPITAL LETTER HA 306 198 C6 CYRILLIC CAPITAL LETTER TSE 307 199 C7 CYRILLIC CAPITAL LETTER CHE 310 200 C8 CYRILLIC CAPITAL LETTER SHA 311 201 C9 CYRILLIC CAPITAL LETTER SHCHA 312 202 CA CYRILLIC CAPITAL LETTER HARD SIGN 313 203 CB CYRILLIC CAPITAL LETTER YERU 314 204 CC CYRILLIC CAPITAL LETTER SOFT SIGN 315 205 CD CYRILLIC CAPITAL LETTER E 316 206 CE CYRILLIC CAPITAL LETTER YU 317 207 CF CYRILLIC CAPITAL LETTER YA 320 208 D0 CYRILLIC SMALL LETTER A 321 209 D1 CYRILLIC SMALL LETTER BE 322 210 D2 CYRILLIC SMALL LETTER VE 323 211 D3 CYRILLIC SMALL LETTER GHE 324 212 D4 CYRILLIC SMALL LETTER DE 325 213 D5 CYRILLIC SMALL LETTER IE 326 214 D6 CYRILLIC SMALL LETTER ZHE 327 215 D7 CYRILLIC SMALL LETTER ZE 330 216 D8 CYRILLIC SMALL LETTER I 331 217 D9 CYRILLIC SMALL LETTER SHORT I 332 218 DA CYRILLIC SMALL LETTER KA 333 219 DB CYRILLIC SMALL LETTER EL 334 220 DC CYRILLIC SMALL LETTER EM 335 221 DD CYRILLIC SMALL LETTER EN 336 222 DE CYRILLIC SMALL LETTER O 337 223 DF CYRILLIC SMALL LETTER PE 340 224 E0 CYRILLIC SMALL LETTER ER 341 225 E1 CYRILLIC SMALL LETTER ES 342 226 E2 CYRILLIC SMALL LETTER TE 343 227 E3 CYRILLIC SMALL LETTER U 344 228 E4 CYRILLIC SMALL LETTER EF 345 229 E5 CYRILLIC SMALL LETTER HA 346 230 E6 CYRILLIC SMALL LETTER TSE 347 231 E7 CYRILLIC SMALL LETTER CHE 350 232 E8 CYRILLIC SMALL LETTER SHA 351 233 E9 CYRILLIC SMALL LETTER SHCHA 352 234 EA CYRILLIC SMALL LETTER HARD SIGN 353 235 EB CYRILLIC SMALL LETTER YERU 354 236 EC CYRILLIC SMALL LETTER SOFT SIGN 355 237 ED CYRILLIC SMALL LETTER E 356 238 EE CYRILLIC SMALL LETTER YU 357 239 EF CYRILLIC SMALL LETTER YA 360 240 F0 NUMERO SIGN 361 241 F1 CYRILLIC SMALL LETTER IO 362 242 F2 CYRILLIC SMALL LETTER DJE 363 243 F3 CYRILLIC SMALL LETTER GJE 364 244 F4 CYRILLIC SMALL LETTER UKRAINIAN IE 365 245 F5 CYRILLIC SMALL LETTER DZE 366 246 F6 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 367 247 F7 CYRILLIC SMALL LETTER YI 370 248 F8 CYRILLIC SMALL LETTER JE 371 249 F9 CYRILLIC SMALL LETTER LJE 372 250 FA CYRILLIC SMALL LETTER NJE 373 251 FB CYRILLIC SMALL LETTER TSHE 374 252 FC CYRILLIC SMALL LETTER KJE 375 253 FD S SECTION SIGN 376 254 FE CYRILLIC SMALL LETTER SHORT U 377 255 FF CYRILLIC SMALL LETTER DZHE SEE ALSO
ascii(7), charsets(7), cp1251(7), koi8-r(7), koi8-u(7), utf-8(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2016-07-17 ISO_8859-5(7)
All times are GMT -4. The time now is 01:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy