10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a rather convoluted script that I use to extract information from CSV files:
sed '1d' PeakTable.txt | awk -F ',' '!/Ladder/{ if ( $4 > 430 && $4 < 490 && $5 > 45 ) print $2, $5; else print $2, 0 }' | awk '{a+=$2}END{for(i in a){print i, a}}' | sed 's/\(\)\(\) /\10\2 /' | sort | awk... (4 Replies)
Discussion started by: Xterra
4 Replies
2. Shell Programming and Scripting
Hello, everyone
I am beginner for shell programming. I want to print all lines that have the same values in first two columns
data:
a b 1 2
a a 3 4
b b 5 6
a b 4 6
what I expected is :
a a 3 4
b b 5 6
but I searched for one hour in... (2 Replies)
Discussion started by: nengcheng
2 Replies
3. Shell Programming and Scripting
Hello Friends,
I have a input file having hundreds of rows. I want them to translate in to columns if column 1 is same.
Input data:
zp06 xxx
zp06 rrr
zp06 hhh
zp06 aaa
zp06 ggg
zp06 qwer
zp06 ser
zl11 old3
zl11 old4
zl11 old5
zl11 old6
zl11 old7
zm14 luri
zm14 body
zm14 ucp (9 Replies)
Discussion started by: suresh3566
9 Replies
4. Shell Programming and Scripting
Hi,
I have a file with multiple columns and for column 5 I want to extract that row into another file if it is equal to or greater than a certain value.
For example:
FAR 4 5 7 LOP
GAT 3 3 3 POL
I want values that are greater than 5 for column 4. So the final file will look like... (1 Reply)
Discussion started by: phil_heath
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I would like to know how can I delete rows of a text file if from the 3rd column onwards there is only zeros?
Thanks in advance (7 Replies)
Discussion started by: fadista
7 Replies
6. Shell Programming and Scripting
HI all,
I have a simple challenge for you.. I have the following pipe delimited file
2345|98|1809||x|969|0
2345|98|0809||y|0|537
2345|97|9809||x|544|0
2345|97|0909||y|0|651
9685|98|7809||x|321|0
9685|98|7909||y|0|357
9685|98|7809||x|687|0
9685|98|0809||y|0|234
2315|98|0809||x|564|0
... (2 Replies)
Discussion started by: nithins007
2 Replies
7. Shell Programming and Scripting
Hi
My pipe delimited .txt file contains rows with 10 columns.
Can anyone advise how I output to file only those rows with the letters ‘ci'
as the first 2 characters in the 3rd column ?
Many thanks (4 Replies)
Discussion started by: malts18
4 Replies
8. UNIX for Dummies Questions & Answers
Hi there, I have a text file with several colums separated by "|;#" I need to search the file extracting all columns starting with the value of "1" or "2" saving in a separate file just the first 7 columns of each row maching the criteria, with replacement of the saparators in the nearly created... (2 Replies)
Discussion started by: capnino
2 Replies
9. Programming
Hi,
I'm working hard on SQL and I came across a hurdle I'm hoping you can help me out with.
I have two tables
table1
headers: chrom start end name score strand
11 9720685 9720721 U0 0 +
21 9721043 9721079 U0 0 -
1 9721093 9721129 U0 0 +
20 ... (2 Replies)
Discussion started by: labrazil
2 Replies
10. Shell Programming and Scripting
Can I have 2 files as in input to the awk command?
Situation is somewhat below,
File A contains number & value delimited by a space.
File B contains number as a part of a line. I am not supposed
to retrieve more than 1 number from a line.
If number from file B matches with number from... (7 Replies)
Discussion started by: videsh77
7 Replies