Hi every body
Help required
file 1
aaaaa
bbbb
cccccc
dddd
ffff
File 2
aaaaa,1,ee,44,5t,6y,
cccccc, .....
dddd, .....
eeeeee, .....
ffff, ......
ggg, .......
i wanna compare two file
if entry in file 1 doesnot exist in file 2 , output show full row content from file 1.
Out put
bbbb
++++++++++++++++++++++++++++++++++++++++++++
Thanks in advance
The_Archer
while IFS= read -r line; do grep -q "$line" file2 || echo "$line"; done < file1
And if you search file1 entries only at the begining of a line and terminated by a coma:
while IFS= read -r line; do grep -q "^$line," file2 || echo "$line"; done < file1
zaxxon
3
awk -F"," 'FNR==NR { _[$1]=$1; next} ! _[$1]' file2 file1
bbbb
What solution doesn't work? mine (while read grep) or zaxxon's (awk)?
What is your OS? What is your shell?
sorry I can't help you about awk.
Good luck