10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a text file with many thousands of lines, a small sample of which looks like this:
InputFile:PS002,003 D -1 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 6 -1 -1 -1 -1 0 509 0
PS002,003 PSQ 0 1 7 18 1 0 -1 1 1 3 -1 -1 ... (5 Replies)
Discussion started by: jvoot
5 Replies
2. UNIX for Beginners Questions & Answers
I have some data that looks like this:
PXD= ZW< 1,6
QR> QRJ== 1,2(5)
QR> QRJ== 4,1(2)
QR> QRJ== 4,2
QRB= QRB 4,2
QWM QWM 6,2
R<C ZW< 11,2
R<H= R<J= 6,1
R>H XZJ= 1,2(2)
R>H XZJ= 2,6(2)
R>H XZJ= 4,1(2)
R>H XZJ= 6,2
RDP RDP 1,2
What I would like to do is if fields $1 and $2 are... (5 Replies)
Discussion started by: jvoot
5 Replies
3. Shell Programming and Scripting
Hi, everyone
I have a dataset like this:
A B C D
A C
C D E
F G H
F D K
Y
X A
K K C Gsome of columns have no values in each line. I want to print all lines that have 1/2/3/4 values, export separately to four files. What I expected is like this:
file1
Y
file 2
A C
X Afile 3... (3 Replies)
Discussion started by: nengcheng
3 Replies
4. Shell Programming and Scripting
Hello to all,
I'm trying to print the value corresponding to the words A, B, C, D, E. These words could appear sometimes and sometimes not inside each group of lines. Each group of lines begins with "ZYX".
My issue with current code is that should print values for 3 groups and only is... (6 Replies)
Discussion started by: Ophiuchus
6 Replies
5. Shell Programming and Scripting
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
6. Shell Programming and Scripting
I would like to compare the values of 2nd column of consecutive lines of same file in such a way so that if the difference between first value and second value is more than 100 it should print complete line else ignore line.
Input File
==========
PDB 2500
RTDB 123
RTDB-EAGLE 122
VSCCP 2565... (4 Replies)
Discussion started by: manuswami
4 Replies
7. Shell Programming and Scripting
Hi,
I have a table like this:
Name A1 A2 A3 B1 B2 B3
111 abc abc abc cbc cbc cbc
222 acv acv n_n bbc bbc bbc
333 bvv bvv bvv cBx ccx ccx
444 ttk ttk ttk kke kke kke
555 mcr mcr mcr mcr mcr mcr
The 1st column is just names... (3 Replies)
Discussion started by: polsum
3 Replies
8. UNIX for Dummies Questions & Answers
Hey guys & gals,
I am hoping for some advice on a sed or awk command that will
allow to only print lines from a file that contain 3 numeric values.
From previous searches here I saw that ygemici used the sed command
to remove lines containing more than 3 numeric values ;
however how... (3 Replies)
Discussion started by: TAPE
3 Replies
9. Shell Programming and Scripting
Hi,
Here is my sample input
X 2 AAA
Y 3 BBB
Y 2 CCC
Z 4 DDD
In field 1, if the value of one line is same as that of next line, I want to concatenate the corresponding value of the second line in the third field with the value of the third field of first line. And I dont need the third... (2 Replies)
Discussion started by: polsum
2 Replies
10. Shell Programming and Scripting
HI All,
I want to cut 5 lines after a pattern using sed or awk. can any one tell me how to do it ? (2 Replies)
Discussion started by: raghin
2 Replies