Search Results

Search: Posts Made By: FelipeAd
1,980
Posted By pamu
Try $ cat file1 name1 name2 name3 ...
Try

$ cat file1
name1
name2
name3
name4
name5
name6
$ cat file2
name1 group1 good
name3 group2 bad success
name4 group3 good
name6 group4 good success success
name9 group5 good
name10...
1,980
Posted By pamu
awk 'NR==FNR{A[$1]=$2;next}{print $1,A[$1]}'...
awk 'NR==FNR{A[$1]=$2;next}{print $1,A[$1]}' file2 file1

OR

join file1 file2 -a 1
1,290
Posted By vgersh99
nawk '{r[$2]++;s[$2]+=$1}END{for(i in r) if...
nawk '{r[$2]++;s[$2]+=$1}END{for(i in r) if (r[i]>1) print int(s[i]/r[i]), i}' myFile
12,029
Posted By methyl
cat file1.txt file2.txt | awk '{print $1}' | sort...
cat file1.txt file2.txt | awk '{print $1}' | sort | uniq -u

name4
name5
12,029
Posted By jim mcnamara
awk ' FILENAME=="file2.txt" {arr[$1]++} ...
awk ' FILENAME=="file2.txt" {arr[$1]++}
FILENAME=="file1.txt" {if ($1 in arr) {next} else {print $0} }' file2.txt file1.txt

Note: file2.txt should be the first parameter
1,900
Posted By ctsgnb
awk '{print $NF}' LT_file.txt | grep -f -...
awk '{print $NF}' LT_file.txt | grep -f - LU_file.txt

awk '{print $NF}' LT_file.txt | while read a
do
grep $a LU_file.txt && grep $a LT_file.txt
done
Showing results 1 to 6 of 6

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