|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do i do the vertical to horizontal??
Code:
I want the above o/p to be in row wise... every row shul hav 7 colmuns oly... |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
How about: Code:
xargs -n7 < file |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Code:
sed '/^$/d' file | awk 'NR%7!=0 {a=a>0?a OFS $1:$1;next} { print a OFS $1;a=""}' OFS="," |
|
#5
|
||||
|
||||
|
Another approach: Code:
grep -v '^$' file | paste - - - - - - - |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk in horizontal and vertical math | busyboy | Shell Programming and Scripting | 6 | 02-15-2013 02:37 AM |
| Vertical And Horizontal Pivoting | kmsekhar | Shell Programming and Scripting | 3 | 02-01-2012 06:32 AM |
| vertical to horizontal | andrisetia | UNIX for Dummies Questions & Answers | 6 | 10-03-2011 06:03 AM |
| Horizontal to vertical | Xterra | UNIX for Dummies Questions & Answers | 3 | 09-09-2011 11:54 AM |
| combine files in horizontal way, not vertical. | jimmy_y | Shell Programming and Scripting | 3 | 10-29-2009 05:10 AM |
|
|