Sponsored Content
Top Forums UNIX for Dummies Questions & Answers single column to multiple columns Post 302149284 by awk on Wednesday 5th of December 2007 01:11:13 PM
Old 12-05-2007
Might try this:

awk 'BEGIN{MAX=0}
/^$/{NR=0; next;}
NR > MAX{MAX=NR}
{A[NR]=A[NR] " " $1}
END{for (I=1;I<=MAX;I++) {print substr(A[I],2)}}'
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Single column to multiple columns in awk

Hi - I'm new to the awk programming language. I'm trying to print a single column of data to several columns, and I found an article on iTWorld.com (ITworld.com - Printing in columns). It looks like the mkCols2 script is very close to what I need to do, but it looks like the end of the code... (2 Replies)
Discussion started by: astroDave
2 Replies

2. UNIX for Dummies Questions & Answers

How to convert a single column into several rows and columns?

I have a program which gives me the output as a single column with hundreds of rows like: 213 314 324 324 123 I want to be able to create a new file from this file which allows me to set the number of rows and columns in the new file, i.e. for this example, if I specify 3 rows and 2... (5 Replies)
Discussion started by: ashton_smith
5 Replies

3. Shell Programming and Scripting

how to introduce a space in a single column without distrubing the other columns

Hello Experts, I am new to this forum, I would like to do the following changes in one of the column of a txt file, which is having around 9 column. For example, column 3 is having letters like this AB11 AB12 C CA CB AC1 AC2 I would like to convert the same column as follows ... (5 Replies)
Discussion started by: Fredrick
5 Replies

4. Shell Programming and Scripting

How to convert a single column into several columns?

Hi I have a ksh script which gives me the output as a single column with several rows like: AAA BBB CCC DDD EEE FFF GGG HHH III I want to be able to create a new file from this file which allows me to set the number of rows and columns in the new file, i.e. for this example, if I... (30 Replies)
Discussion started by: pinpe
30 Replies

5. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

6. Shell Programming and Scripting

Multiple columns to a single column

I have this input: 10 22 1 100 11 22 10 1 50 14 3 1 100 23 3 1 100 24 15 1 100 10 22 5 3 1 33.333 11 22 1 100 It has an inconsistent number of fields but the last field is determined by 100/(NF-2) using awk. I want to take this multiple columned input file and transform so that... (2 Replies)
Discussion started by: mdlloyd7
2 Replies

7. Shell Programming and Scripting

Awk match multiple columns in multiple lines in single file

Hi, Input 7488 7389 chr1.fa chr1.fa 3546 9887 chr5.fa chr9.fa 7387 7898 chrX.fa chr3.fa 7488 7389 chr21.fa chr3.fa 7488 7389 chr1.fa chr1.fa 3546 9887 chr9.fa chr5.fa 7898 7387 chrX.fa chr3.fa Desired Output 7488 7389 chr1.fa chr1.fa 2 3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

8. Shell Programming and Scripting

break from a single list into multiple columns

Hi Guys, I am prety new to the hell scripting world. I am running some grep/cut commands and extracting from a csv file into a list. But the final product I need is that the whole list that I now have has to be broken and separated into columns. Say what I now have extracted is a list of... (6 Replies)
Discussion started by: h_rishi
6 Replies

9. Shell Programming and Scripting

Converting Single Column into Multiple rows, but with strings to specific tab column

Dear fellows, I need your help. I'm trying to write a script to convert a single column into multiple rows. But it need to recognize the beginning of the string and set it to its specific Column number. Each Line (loop) begins with digit (RANGE). At this moment it's kind of working, but it... (6 Replies)
Discussion started by: AK47
6 Replies

10. UNIX for Dummies Questions & Answers

How to generate one long column by merging two separate two columns in a single file?

Dear all, I have a simple question. I have a file like below (separated by tab): col1 col2 col3 col4 col5 col6 col7 21 66745 rs1234 21 rs5678 23334 0.89 21 66745 rs2334 21 rs9978 23334 0.89 21 66745 ... (4 Replies)
Discussion started by: forevertl
4 Replies
GUS(4)							   BSD Kernel Interfaces Manual 						    GUS(4)

NAME
gus -- Gravis UltraSound/UltraSound MAX audio device driver SYNOPSIS
gus0 at isa? port 0xPPP irq X drq Y drq2 Z audio* at audiobus? DESCRIPTION
The gus driver provides support for the Gravis UltraSound (GUS) and GUS MAX audio cards. Both cards have on-board memory which is used for seamless playback of samples. They can play back 8- or 16-bit samples at up to 44.1kHz. They can record 8-bit samples at up to 44.1kHz. The UltraSound MAX is a full-duplex sound device, and if configured with two DRQ channels can be used for simultaneous playback and record- ing. The I/O port base is jumper-selected, and may be chosen from 0x210-0x260 in steps of 0x10. (The normal setting is 0x220.) The GUS takes 16 ports at its base address and 8 ports at its base address + 0x100. The IRQ is software programmed, so you may select any IRQ from the set {3,5,7,9,11,12,15}. The DRQ lines are software programmed, and may be chosen from {1,3,5,6,7}. The drq2 field in the configuration file line specifies a second DRQ line for recording. If there is no drq2 field in the config file, the playback channel will be used for recording DMA and only half-duplex mode will be available. The Gravis UltraSound MAX has an additional CODEC onboard which is addressed with four ports at an offset of 0x10C from the base ports (0x31C-0x36C). SEE ALSO
audio(4) REFERENCES
Gravis UltraSound Low-Level Toolkit, Revision 2.01, 20 May 1993, published by Advanced Gravis and Forte Technologies. HISTORY
The gus device driver appeared in NetBSD 1.1. BUGS
The full-duplex features of the GUS MAX have not been fully tested, and full-duplex on the original GUS may not be possible at all. Only two voices on the GF1 synthesizer chip are used by this driver (for left and right channels). Manipulating the mixer while audio samples are playing can lead to device driver confusion (and maybe even a system panic). Manipulating the mixer device seems to create pregnant system pauses, probably due to excessive interrupt masking. The joystick and MIDI port interfaces are not supported. BSD
June 22, 2005 BSD
All times are GMT -4. The time now is 05:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy