10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
so im searching the process table with:
ps -ef | awk -F"./rello.java" '{ print substr($0, index($0,$2)) }'
I only want it to print everything that's infront of the "./rello.java". That's because im basically getting the arguments that was passed to the rello.java script.
this works.
... (2 Replies)
Discussion started by: SkySmart
2 Replies
2. Shell Programming and Scripting
I need to find the max value of all columns except the 1st column and print the answer along with the 1st column.
Input
123xyz 0 0 1 2 0 0 0 0 0 0 0
234xyz 0 0 0 0 0 0 0 0 0 0 0
345xyz 0 0 1 0 0 0 ... (8 Replies)
Discussion started by: ncwxpanther
8 Replies
3. Shell Programming and Scripting
I need to find the max/min of columns 1 and 2 of a 2 column file what contains the special character ">".
I know that this will find the max value of column 1.
awk 'BEGIN {max = 0} {if ($1>max) max=$1} END {print max}' input.file
But what if I needed to ignore special characters in the... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
4. Shell Programming and Scripting
Experts,
Here is my question.
I have got file like below
# cat file
XYZb,24,26,6
XYZc,24,26,6
XYZe,24,25,5
XYZf,23,29,5
XYZi,16,25,5
XYZj,24,26,7
XYZn,17,23,4
XYZz,23,29,5
Now, I want to print the line's Column1 whose Column 3 is the max of all.
My code is awk -F',' 'BEGIN {max... (9 Replies)
Discussion started by: sathyaonnuix
9 Replies
5. Shell Programming and Scripting
I have an input that looks like this:
chr1 mm9_knownGene utr3 3204563 3206102 0 - . gene_id "Xkr4"; transcript_id "uc007aeu.1";
chr1 mm9_knownGene utr3 4280927 4283061 0 - . gene_id "Rp1"; transcript_id "uc007aew.1";
chr1 mm9_knownGene ... (5 Replies)
Discussion started by: pbluescript
5 Replies
6. Shell Programming and Scripting
Input_ File :
2 3 4 5
1 1 0 1
2 1 -1 1
2 1 3 1
3 1 4 1
6 5 6 6
6 6 6 7
6 7 6 8
5 8 6 7
Desired output :
2 3 4 5
-1 1 4 1
6 5 6 8
5 8 6 7 (3 Replies)
Discussion started by: vasanth.vadalur
3 Replies
7. Shell Programming and Scripting
Dear all,
I have been trying to print an entire field, if the first line of the field is matching.
For example, my input looks something like this.
aaa ddd zzz
123 987 126
24 0.650 985
354 9864 0.32
0.333 4324 000
I am looking for a pattern,... (5 Replies)
Discussion started by: Chulamakuri
5 Replies
8. Shell Programming and Scripting
As per my understanding below mentioned line of code finding a word 'boy' in $ACULOG...
num_errors=`grep -i -e fail -e illegal -e exception -e "<E" -e boy $ACULOG | wc -l`
if I'm not corerct, please correct me. How I can find entire line like "This is a boy" with something similar as above... (1 Reply)
Discussion started by: heyitsmeok
1 Replies
9. Shell Programming and Scripting
Hi all,
Ive searched the forum but with no luck...
I have a file:
ID Name Val
1 bob 45
2 joe 89
3 sue 11
4 steve 89
...
etc
I want to find a way to print... (6 Replies)
Discussion started by: muay_tb
6 Replies
10. Shell Programming and Scripting
I'm having problems since few days ago, and i'm not able to make it works with a simple awk+grep script (or other way to do this).
For example, i have a input file1.txt:
cat inputfile1.txt
218299910417
1172051195
1172070231
1172073514
1183135117
1183135118
1183135119
1281440202
... (3 Replies)
Discussion started by: poliver
3 Replies