Search Results

Search: Posts Made By: NamS
4,011
Posted By NamS
I tried to modify the code but it is just giving...
I tried to modify the code but it is just giving me the 1st number.


awk 'NR==1
{printf sum,N; N+=3; sum=0}
{sum+=$1}
END {printf sum}
> '...
4,011
Posted By NamS
Sum every 3 consecutive numbers in a column
Dear All,

I have a file with only one column. And I want to add every 3 consecutive numbers together and print the result.

Input File:

21.1
10
10
55
11
99
10
8
4


Expected...
1,492
Posted By NamS
Adding the corresponding values for every 5th consecutive numbers
Dear All,

I have a file which is as follows:

Input File:


231 100.1
233 99
235 200.9
238 80.1
239 90.2
240 77.0
243 99.5
245 16.20
246 13.55
247 ...
2,203
Posted By NamS
Finding out the intersection in two files using 4 fields with the help of awk and UNIX
Dear All,
I have 2 files. If field 1, 2, 4 and 5 matches in both file1 and file2, I want to print the whole line of file1 and file2 one after another in my output file.

File1:

sc2/80 ...
2,377
Posted By NamS
@rdcways and RudiC: It works. Thanks.
@rdcways and RudiC: It works. Thanks.
2,377
Posted By NamS
[Solved] Looking for lines, which is present in file1 but not in file2 using UNIX and awk
I have 2 files with 7 fields and i want to print the lines which is present in file1 but not in file2 based on field1 and field2.

Logic: I want to print all the lines, where there is a particular...
1,704
Posted By NamS
Thanks mjf.
Thanks mjf.
1,704
Posted By NamS
It works. Thank you very much. The output...
It works. Thank you very much.

The output gives a semicolon where it concatenates. How do i avoid this ";"

s2/80 20 . A T 86 N=2 F=5;U=4;s2/80 20 . A A 20 N=2 F=5;U=4
s2/20 10 . G T 90 ...
1,704
Posted By NamS
Because the 4th and the 5th column has A G for...
Because the 4th and the 5th column has A G for both File1 and 2. If File1 has A G at 4th and at 5th column, then I want to select only those which as A A or G G in File2. The logic is if in File 1,...
1,704
Posted By NamS
Comparing two files using four fields
Dear All,
I want to compare File1 and File2 (Separated by spaces) using four fields (Column 1,2,4,5).
Logic: If column 1 and 2 of File1 and File2 match exactly and if the File2 has the same...
1,290
Posted By NamS
Comparing two files using four fields
I want to compare File1 and File2 (Separated by spaces) using four fields (Column 1,2,4,5).
Logic: If column 1 and 2 of File1 and File2 match exactly and if the File2 has the same characters as any...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy