Sponsored Content
Top Forums Shell Programming and Scripting awk convert from line to column Post 302224446 by jarmouda on Wednesday 13th of August 2008 07:31:41 AM
Old 08-13-2008
MySQL awk convert from line to column

i have an output like this :
012008
25760883
022008
12273095
032007
10103
032008
10115642
042007
20952798

but i would like to have it like this
012008,25760883
022008,12273095
032007,10103
032008,10115642
042007,20952798


any help will be apreciated
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

read a line from a csv file and convert a column to all caps

Hello experts, I am trying to read a line from a csv file that contains '.doc' and print the second column in all caps. e.g. My csv file contains: Test.doc|This is a Test|test1|tes,t2|test-3 Test2.pdf|This is a Second Test| test1|tes,t2|t-est3 while read line do echo "$line" |... (3 Replies)
Discussion started by: orahi001
3 Replies

2. Shell Programming and Scripting

line to column using awk

hi, i'm a newbie and this is my first post here. 'hope all of you fellow members are doing fine. so here is my first thread to ask for help on how to use awk language to do this task. i have a file to process and after a series of other awk commands and shell scripts i managed to convert the... (11 Replies)
Discussion started by: genix2008
11 Replies

3. UNIX for Dummies Questions & Answers

Convert first line into column

I have a file: 2009_11 3455 500 5355 600 7777 700 The first line is the period. I want to concatenate the Period into every line using a one line command..I guess maybe awk or something. So the output would look like this: 3455 500 2009_11 5355 600 2009_11 7777 700 2009_11 ... (4 Replies)
Discussion started by: alfredo123
4 Replies

4. Shell Programming and Scripting

How to convert irregular lines into formatted column using awk in windows2003 server environment?

Dear experts, I'm newbie to awk scripting. Need your great help to convert the irregular lines into column using awk in windows2003 server environment. (Sorting based on "Pri Number" column) Input files is as follows: Partition Name: OA Partition UID: ... (0 Replies)
Discussion started by: ruirus
0 Replies

5. Shell Programming and Scripting

Counting rows line by line from a specific column using Awk

Dear UNIX community, I would like to to count characters from a specific row and have them displayed line-by-line. I have a file called testAwk2.csv which contain the following data: rabbit penguin goat giraffe emu ostrich I would like to count in the middle row individually... (4 Replies)
Discussion started by: vnayak
4 Replies

6. Shell Programming and Scripting

Awk next line as column

Hi, This forum rocks. I think this might be an easy thing, but since I am new to awk, please help me. input: x y z 1 a b c 2 d e f 3 g h i 7 output: x y z 1 a b c 2 d e f 3 (8 Replies)
Discussion started by: jacobs.smith
8 Replies

7. UNIX for Dummies Questions & Answers

awk: convert column to row in a specific way

Hi all! I have this kind of output: a1|b1|c1|d1|e1 a2|b2|c2 a3|b3|c3|d3 I would like to transpose columns d and e (when they exist) in column c, and under the row where they come from. Then copying the beginning of the row. In order to obtain: a1|b1|c1 a1|b1|d1 a1|b1|e1 a2|b2|c2... (1 Reply)
Discussion started by: lucasvs
1 Replies

8. Shell Programming and Scripting

awk or sed - Convert 2 lines to 1 line

Hi, Just trying to get to grips with sed and awk for some reporting for work and I need some assistance: I have a file that lists policy names on the first line and then on the second line whether the policy is active or not. Policy Name: Policy1 Active: yes Policy... (8 Replies)
Discussion started by: guinch
8 Replies

9. Shell Programming and Scripting

Convert awk line into perl

I have an awk statement in a ksh script that looks for a certain string then looks at each line after to find another match. The match could be the next line or second down and it works well. nawk 'BEGIN {FS=RS;RS="!"} /interface loopback0/ {for(i=1;i<=NF; i++) if ($i ~ /ip... (5 Replies)
Discussion started by: numele
5 Replies

10. Shell Programming and Scripting

Convert a column to a line

Hi, I need to convert my text file into a sort of matrix form. my input file has 5 columns. $2 and $4 will be ignored and omitted from output, while $3 need to be re-arranged horizontally on top:- Akd1 aa233 Akd1 545 524.2 jlk01 aa233 Akd1 90 447 mht5 ... (2 Replies)
Discussion started by: redse171
2 Replies
LODSCORE(1)						      General Commands Manual						       LODSCORE(1)

NAME
lodscore - compares likelihoods at locally optimal theta SYNOPSIS
lodscore [options] ipedfile.dat pedfile.dat DESCRIPTION
This manual page documents briefly the lodscore command. In fact this is a very raw intend to provide a manpage because the Debian GNU/Linux distribution requires each program to have a manpage. Any enhancement would be greatly apreciated. lodscore is part of the fastlink software package. Lodscore compares -2log(likelihood) at the locally optimal theta to -2log(likelihood) at a theta that is 1/2 in every component (i.e. each locus unlinked to all the rest). In LINKAGE ILINK more likelihood function evaluations are done after the last printed iteration line, but these likelihood function evaluations are unnecessary (see paper2.ps from the fastlink-doc Debian package for more details). OPTIONS
There might be options but I did not found any information about them. Please foreward any information about them to <tille@debian.org> SEE ALSO
ilink(1), linkmap(1), mlink(1), unknown(1). Word-Wide-Web: http://www.ncbi.nlm.nih.gov/CBBResearch/Schaffer/fastlink.html AUTHOR
: Alejandro Schaeffer <schaffer@helix.nih.gov> and others This manual page was written by Andreas Tille <tille@debian.org>, for the Debian GNU/Linux system (but may be used by others). April 15, 2003 LODSCORE(1)
All times are GMT -4. The time now is 12:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy