Search Results

Search: Posts Made By: osama ahmed
1,306
Posted By osama ahmed
I want to replace the row with zero value
I have this file

5
9
7
23
0
5
7
78
0
3
7
0
5
44
9
0

i want to remove the row with zero value but i want to replace it with the above + under over 2 like this (the second zero) ...
5,365
Posted By osama ahmed
list all lines where field 1 is the lowest for all lines that have an identical field 2
I have this file
0.450908 3
0.491995 43
0.492116 43
0.493203 43
0.493324 43
0.494411 43
0.494532 43
0.495619 43
0.49574 43
0.509831 103
0.535661 5
0.535782 5
0.536869 5 ...
5,365
Posted By osama ahmed
1/ awk '!a[$2]||a[$2]>$1 {a[$2]=$1} END {for (i in a) print a[i],i}' file 2/ awk '!($2 in a)|
I try both of them but they omit some rows of input file thanks
5,365
Posted By osama ahmed
Meaning of awk script
what does this mean?
awk '!a[$2]||a[$2]>$1 {a[$2]=$1} END {for (i in a) print a[i],i}' file
Showing results 1 to 4 of 4

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