[ILUGC] Re: [Help] Looking for sed / awk solution to compare and delete tex

  • From: Balasubramaniam Natarajan <bala150985@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Tue, 11 Oct 2016 21:42:51 +0530

Is this what you want ?  the -v will invert the selection.
$ grep -f code.txt fullurl.txt
https://www.youtube.com/watch?v=T7E1rq7zHLc
https://www.youtube.com/watch?v=JePixuWr2n0
https://www.youtube.com/watch?v=Dl2WUH2m69I
$ grep -v -f code.txt fullurl.txt
https://www.youtube.com/watch?v=5K0gRrowTyA
https://www.youtube.com/watch?v=lXRaaHxshWg
https://www.youtube.com/watch?v=uN_vBFyu_-g
https://www.youtube.com/watch?v=puDkLFcCZyI
https://www.youtube.com/watch?v=n4ZKkzWC9Xw
https://www.youtube.com/watch?v=08LuMoiF_tI
https://www.youtube.com/watch?v=Ki0boGH4-Kc


On Tue, Oct 11, 2016 at 9:39 PM, Balasubramaniam Natarajan <
bala150985@xxxxxxxxx> wrote:

Do you want it only with awk/sed ?

On Tue, Oct 11, 2016 at 9:27 PM, Baskar Selvaraj <baskar@xxxxxxxxxxxx>
wrote:

Dear all,
I have two files, one file having the youtube string and other file having
the complete URL

code.txt

Dl2WUH2m69I
T7E1rq7zHLc
LGwyBeuVjhU
7jRSjxZjUf8
P-0_gDXqYeQ
piIrBw24c8M
s3MhJ7buOeA
_mcC8kFacrk
6rdLu7wiZOE
hp-gCvW8PRY
n_HlWovib3Y
skFrR3g4BRQ
JePixuWr2n0

fullurl.txt

https://www.youtube.com/watch?v=T7E1rq7zHLc
https://www.youtube.com/watch?v=5K0gRrowTyA
https://www.youtube.com/watch?v=lXRaaHxshWg
https://www.youtube.com/watch?v=JePixuWr2n0
https://www.youtube.com/watch?v=Dl2WUH2m69I
https://www.youtube.com/watch?v=uN_vBFyu_-g
https://www.youtube.com/watch?v=puDkLFcCZyI
https://www.youtube.com/watch?v=n4ZKkzWC9Xw
https://www.youtube.com/watch?v=08LuMoiF_tI
https://www.youtube.com/watch?v=Ki0boGH4-Kc

Now, the requirement is to read the code.txt file line by line and remove
those lines in fullurl.txt

Any sed/awk solution would be helpful.

Thanks in advance.

--
S. Baskar


_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/




--
Regards,
Balasubramaniam Natarajan
http://bullet-bala.blogspot.in/ ;<http://blog.etutorshop.com>
https://www.youracclaim.com/user/balasubramaniam-natarajan




-- 
Regards,
Balasubramaniam Natarajan
http://bullet-bala.blogspot.in/ ;<http://blog.etutorshop.com>
https://www.youracclaim.com/user/balasubramaniam-natarajan


_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: