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

permissions - Mount is denied because the NTFS volume is already exclusively opened - Ask Ubuntu

Windows XP installation, no previous version of Windows NT - Super User

software installation - How to install linux driver for a lb-link wireless usb adapter - Ask Ubuntu