Sponsored Content
Top Forums Shell Programming and Scripting 1st column,2nd column on first line 3rd,4th on second line ect... Post 302619413 by batcho on Thursday 5th of April 2012 11:42:07 AM
Old 04-05-2012
That's only giving me:

,2nd line
,4th line
,6th line
...

I need:

1st line,2nd line
3rd line,4th line
5th line,6th line


Thanks for the quick response
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to extract 3rd line 4th column of a file

Hi, Shell script: I would need help on How to extract 3rd line 4th column of a file with single liner Thanks in advance. (4 Replies)
Discussion started by: krishnamurthig
4 Replies

2. Shell Programming and Scripting

grep data on 2nd line and 3rd column

How do I grep/check the on-hand value on the second line of show_prod script below? In this case it's a "3". So if it's > 0, then run_this, otherwise, quit. > ./show_prod Product Status Onhand Price shoe OK 3 1.1 (6 Replies)
Discussion started by: joker_789us
6 Replies

3. Shell Programming and Scripting

get 3rd column of nth line

hi; i have a file.txt and its 9th, 10th and 11th line lines are: RbsLocalCell=S2C1 maxPortIP 4 (this is 9th line) RbsLocalCell=S3C1 maxPortIP 4 (this is 10th line) RbsLocalCell=S1C1 ... (11 Replies)
Discussion started by: gc_sw
11 Replies

4. Shell Programming and Scripting

Awk multiple lines with 4th column on to a single line

This is related to one of my previous post.. I have huge file currently I am using loop to read file and checking each line to build this single record, its taking much much time to parse those records.. I thought there should be a way to do this in awk or sed. I found this code in this forum... (7 Replies)
Discussion started by: Vasan
7 Replies

5. UNIX for Dummies Questions & Answers

Search word in 3rd column and move it to next column (4th)

Hi, I have a file with +/- 13000 lines and 4 column. I need to search the 3rd column for a word that begins with "SAP-" and move/skip it to the next column (4th). Because the 3rd column need to stay empty. Thanks in advance.:) 89653 36891 OTR-60 SAP-2 89653 36892 OTR-10 SAP-2... (2 Replies)
Discussion started by: AK47
2 Replies

6. Shell Programming and Scripting

Changing values only in 3rd column and 4th column

#cat file testing test! nipw asdkjasjdk ok! what !ok host server1 check_ssh_disk!102.56.1.101!30!50!/ other host server 2 des check_ssh_disk!192.6.1.10!40!30!/ #grep check file| awk -F! '{print $3,$4}'|awk '{gsub($1,"",$1)}1' 50 30 # Output: (6 Replies)
Discussion started by: kenshinhimura
6 Replies

7. UNIX for Dummies Questions & Answers

Want the UNIX code - I want to sum of the 1st column wherever the first 2nd and 3rd columns r equal

I have the code for the below things.. File1 has the content as below 8859 0 subscriberCreate 18 0 subscriberPaymentMethodChange 1650 0 subscriberProfileUpdate 7668 0 subscriberStatusChange 13 4020100 subscriberProfileUpdate 1 4020129 subscriberStatusChange 2 4020307 subscriberCreate 8831... (5 Replies)
Discussion started by: Mahen
5 Replies

8. Linux

Print the 1st column and the value in 2nd or 3rd column if that is different from the values in 1st

I have file that looks like this, DIP-17571N|refseq:NP_651151 DIP-17460N|refseq:NP_511165|uniprotkb:P45890 DIP-17571N|refseq:NP_651151 DIP-19241N|refseq:NP_524261 DIP-19241N|refseq:NP_524261 DIP-17151N|refseq:NP_524316|uniprotkb:O16797 DIP-19588N|refseq:NP_731165 ... (2 Replies)
Discussion started by: Syeda Sumayya
2 Replies

9. Shell Programming and Scripting

Solution for replacement of 4th column with 3rd column in a file using awk/sed preserving delimters

input "A","B","C,D","E","F" "S","T","U,V","W","X" "AA","BB","CC,DD","EEEE","FFF" required output: "A","B","C,D","C,D","F" "S", T","U,V","U,V","X" "AA","BB","CC,DD","CC,DD","FFF" tried using awk but double quotes not preserving for every field. any help to solve this is much... (5 Replies)
Discussion started by: khblts
5 Replies

10. UNIX for Beginners Questions & Answers

Compare 1st column from 2 file and if match print line from 1st file and append column 7 from 2nd

hi I have 2 file with more than 10 columns for both 1st file apple,0,0,0...... orange,1,2,3..... mango,2,4,5..... 2nd file apple,2,3,4,5,6,7... orange,2,3,4,5,6,8... watermerlon,2,3,4,5,6,abc... mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
NGRAPH(1)						      General Commands Manual							 NGRAPH(1)

NAME
Ngraph - creating scientific 2-dimensional graphs SYNOPSIS
ngraph [options] [data file(s) or ngp file] DESCRIPTION
Ngraph is the program to create scientific 2-dimensional graphs for researchers and engineers. Graphs can be exported to PostScript, SVG, PNG or PDF format. OPTIONS
Command line options are: -L file load ngp file -x column data column for the x axis -y column data column for the y axis -X use X axis as the x axis -Y use Y axis as the y axis -U use U axis as the x axis -R use R axis as the y axis -d {mark | line | polygon | curve | diagonal | arrow | rectangle | rectangle_fill | rectangle_solid_fill | errorbar_x | errorbar_y | stair- case_x | staircase_y | bar_x | bar_y | bar_fill_x | bar_fill_y | bar_solid_fill_x | bar_solid_fill_y | fit} specify plot type -m type specify mark type (0-89) -o size specify mark size -l style specify line style -w width specify line width -CR n specify red component of the 1st plot color (0-255) -CG n specify green component of the 1st plot color (0-255) -CB n specify blue component of the 1st plot color (0-255) -cr n specify red component of the 2nd plot color (0-255) -cg n specify green component of the 2nd plot color (0-255) -cb n specify blue component of the 2nd plot color (0-255) -s line specify number of the head skip -r step specify number of the read step -f line specify number of the final line -vx n neighbor average of the x data -vy n neighbor average of the y data -mx formula specify math transformation for the x data -my formula specify math transformation for the y data -ex {linear | log | inverse | MJD} specify scale type of the x axis -ey {linear | log | inverse | MJD} specify scale type of the y axis -minx value specify minimum value of x axis -maxx value specify maximum value of x axis -incx value specify increment value of x axis -miny value specify minimum value of y axis -maxy value specify maximum value of y axis -incy value specify increment value of y axis -g load settings from data file -png file convert ngp file to PNG format -pdf file convert ngp file to PDF format -ps file convert ngp file to PostScript format -eps file convert ngp file to Encapsulated PostScript format -svg file convert ngp file to SVG format -gra file convert ngp file to GRA format -dialog show print dialog (with -p option) -p file print ngp file -n output ngp-file to stdout -h, --help show help message -v, --version show version of Ngraph -V, --VERSION show detail information about Ngraph FILES
${HOME}/.Ngraph/Ngraph.nsc start up script ${HOME}/.Ngraph/Ngraph.ini configuration file ${HOME}/.Ngraph/Ngraph.ngp default graph AUTHORS
Satoshi ISHIZAKA Hiroyuki Ito <ZXB01226@nifty.com> SEE ALSO
ngp2(1) COPYRIGHT
Copyright (C) 2003 Satoshi ISHIZAKA Copyright (C) 2008-2011 Hiroyuki Ito 4th Berkeley Distribution Local NGRAPH(1)
All times are GMT -4. The time now is 04:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy