Article 55KTY extract string shell script

extract string shell script

by
sunlinux
from LinuxQuestions.org on (#55KTY)
a file contains below entries

[1] http://live.bb.com/sys/diag/viewrun.jsp?id=1600810147
[2] http://live.bb.com/sys/orgs/org/?id=1342907248
[3] http://live.bb.com/sys/orgs/org/acc/?id=1342908940
[4] http://live.bb.com/sys/diag/viewrun.jsp?id=1600810147
[5] http://live.bb.com/sys/orgs/org/?id=1342907248
[6] http://live.bb.com/sys/orgs/org/acc/?id=1342908940
[7] http://live.bb.com/sys/diag/viewrun.jsp?id=1600810122
[8] http://live.bb.com/sys/orgs/org/?id=1342907248
[9] http://live.bb.com/sys/orgs/org/acc/?id=1342908940
[10] http://live.bb.com/sys/diag/viewrun.jsp?id=1600810122
[11] http://live.bb.com/sys/orgs/org/?id=1342907248
[12] http://live.bb.com/sys/orgs/org/acc/?id=1342908940
[13] http://live.bb.com/sys/diag/viewrun.jsp?id=1600809868
[14] http://live.bb.com/sys/orgs/org/?id=1342907248
[15] http://live.bb.com/sys/orgs/org/acc/?id=1342908940
[16] http://live.bb.com/sys/diag/viewrun.jsp?id=1600809955
[17] http://live.bb.com/sys/orgs/org/?id=1342907248

I want to extract only values after jsp?id= for example from 'jsp?id=1600809955' I want to extract 1600809955 and print it, if any duplicate entry remove while printinglatest?d=yIl2AUoC8zA latest?i=KgOl_zoSm5c:ETnmu9S6yZw:F7zBnMy latest?i=KgOl_zoSm5c:ETnmu9S6yZw:V_sGLiP latest?d=qj6IDK7rITs latest?i=KgOl_zoSm5c:ETnmu9S6yZw:gIN9vFwKgOl_zoSm5c
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments