9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
The awk below executes and is close (producing the first 4 columns in desired). However, when I add the sum of $7, I get nothing returned. Basically, I am trying to combine all the matching $4 in f1 and output them with the average of $7 in each match. Thank you :).
f1
... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
I am trying to combine all matching lines in the tab-delimited using awk. The below runs but no output results. Thank you :).
input
chrX 110925349 110925532 ALG13
chrX 110925349 110925532 ALG13
chrX 110925349 110925532 ALG13
chrX 47433390 47433999 SYN1... (3 Replies)
Discussion started by: cmccabe
3 Replies
3. Shell Programming and Scripting
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies
4. Shell Programming and Scripting
Hello everyone,
I have a little script below:
die "Usage infile outfile reGex" if @ARGV != 3;
($regex) = @ARGV;
open(F,$ARGV) or die "Can't open";
open(FOUT,"+>$ARGV") or die "Can't open";
while (<F>)
{
print FOUT if /$regex/.../$regex/;
}
No matter what I give $regex on the... (2 Replies)
Discussion started by: new bie
2 Replies
5. Shell Programming and Scripting
Hi,
I am trying to locate the occurences of certain pattern like 'Possible network disconnect' in a text file. I can get the actual lines matching the pttern using:
grep -w 'Possible network disconnect' file_name.
But I am more interested in getting the timing of these events which are... (7 Replies)
Discussion started by: sagarparadkar
7 Replies
6. Shell Programming and Scripting
Hi,
I have two comma separated files. I would like to see field 1 value of File1 exact match in field 2 of File2. If the value matches, then it should print matched lines from File2. I have achieved the results using cut, paste and egrep -f but I would like to use awk as it is efficient way and... (7 Replies)
Discussion started by: SBC
7 Replies
7. Shell Programming and Scripting
Hi I have a very long file with 4 columns of numbers for example
1875 1876 12725 12723
13785 13786 4232 4230
13184 13185 ... (2 Replies)
Discussion started by: ananyob
2 Replies
8. Shell Programming and Scripting
I have a text file, a sample of which is as follows:
r/- * 0: WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles/Images/headerGRADIENT_Tall.gif
r/- * 0: WINDOWS/SoftwareDistribution/Download/cf8ec753e88561d2ddb53e183dc05c3e/backoff.jpg
r/- * 0: ... (2 Replies)
Discussion started by: stumpyuk
2 Replies
9. Shell Programming and Scripting
Hi,
I need to redirect the lines in a file to a different file if the character starting from 2 to 6 in the line are numerical .
Please let me know if anyone have any script to do this.
Thanks,
Ranjit (4 Replies)
Discussion started by: torenji
4 Replies