bash - Get the unique lines of second file in result of comparing two files - Ask Ubuntu


i have 2 text files, , want read file1 line line, searching same line in file2 , removing file2.

i have pseudocode of:

for line in file1.txt   sed search line , delete in file2.txt done 

you accomplish grep.

here example:

$ echo localhost > local_hosts  $ grep -v -f local_hosts /etc/hosts 127.0.1.1       ubuntu  # following lines desirable ipv6 capable hosts fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User