title: How to combine results of grep command
body: <p>I'd like to grep a string in a file and combine all the results in one line with command seperated.</p>
  
  <blockquote>
    <p>grep 1000 /tmp/userfile</p>
  </blockquote>
  
  <p>Output of the grep, sometimes the output is 2 liner or more.</p>
  
  <blockquote>
    <p>user12:x:1000:user12,user100,user200,user300,user400,user500
    user13:x:1000:user13,user600,user700,user800,user900,user1000
    user14:x:1000:user14,user2600,user2700,user2800,user2900,user21000</p>
  </blockquote>
  
  <p>what I want to achieve is to remove user12:x:1000:user12, user13:x:1000:user13 and user14:x:1000:user14 then combined everyone with command seperated like the one below.</p>
  
  <blockquote>
    <p>user100,user200,user300,user400,user500,user600,user700,user800,user900,user1000,user2600,user2700,user2800,user2900,user21000</p>
  </blockquote>
  
  <p>Hope someone can help me with this. thanks.</p>