title: filter unique parameters from file
body: <p>i have file contains urls plus params like following</p>
  <pre><code>https://example.com/endpoint/?param1=123&amp;param2=1212
  https://example.com/endpoint/?param3=123&amp;param1=98989
  https://example.com/endpoint/endpoint3/?param2=123
  https://example.com/endpoint/endpoint2/?param1=123
  https://example.com/endpoint/endpoint2/
  https://example.com/endpoint/endpoint5/&amp;quot;//i.example.com/00/s/Nzk5WDEwMjQ=/z/47IAAOSwBu5hXIKF
  </code></pre>
  <p>and i need to filter only urls with unique params
  the desired output</p>
  <pre><code>http://example.com/endpoint/?param1=123&amp;param2=1212
  https://example.com/endpoint/?param3=123&amp;param1=98989
  https://example.com/endpoint/endpoint3/?param2=123
  </code></pre>
  <p>i managed to filter only urls with params with grep
  <code>grep -E '(\?[a-zA-Z0-9]{1,9}\=)'</code></p>
  <p>but i need to filter params in the same time so i tried with awk with the same regex
  but it gives error</p>
  <pre><code>awk '{sub(\?[a-zA-Z0-9]{1,9}\=)} !seen[$0]++'
  </code></pre>
  <h1>update</h1>
  <p>i am sorry for editing the desired output but when i tried the scripts i figured out that their a lot of carbege in my file need to filter too.
  i tried @James Brown with some editing and it looks good till the end line it dose not filter it unfortunately</p>
  <pre><code>awk -F '?|&amp;' '$2&amp;&amp;!a[$2]++'
  </code></pre>
  <p>and to be more clear why the that output is good for me
  it chosed the 1 st line because it has at least param1
  2nd line because it has at least param3
  3 line because it has at least param2
  the comparison method here is choose just unique parameter whatever it concatenate with others with <code>&amp;</code> char or not</p>