title: /bin/sh + "grep -o" + regular expression = single line output?
body: <p>after some investigation I have managed to find my wanted regular expression to work on /bin/sh - busybox:</p>
  
  <p><strong>INPUT</strong>:</p>
  
  <pre><code>Mar  8 09:58:29 mysuperhost kern.alert kernel: Rejected OUT -- IN=br0 OUT=vlan2 SRC=192.168.1.8 DST=3.26.211.8 LEN=95 TOS=0x00 PREC=0x00 TTL=127 ID=648 PROTO=UDP SPT=22008 DPT=51413 LEN=75
  </code></pre>
  
  <p><strong>REGEXP</strong>:</p>
  
  <pre><code>grep -o -E '((^.{0,16})|(IN=.\S*)|(IN=.\S*)|(OUT=.\S*)|(SRC=.\S*)|(DST=.\S*)|(PROTO=.\S*)|(SPT=.\S*)|(DPT=.\S*))'
  </code></pre>
  
  <p>Which gives me:</p>
  
  <pre><code>Mar  8 09:58:29
  IN=br0
  OUT=vlan2
  SRC=192.168.1.8
  DST=3.26.211.8
  PROTO=UDP
  SPT=22008
  DPT=51413
  </code></pre>
  
  <p>The problem:
  I don't seem to be able to have grep giving me the result on a single line </p>
  
  <p>The wanted result:</p>
  
  <pre><code>Mar  8 09:58:29 IN=br0 OUT=vlan2 SRC=192.168.1.8 DST=3.26.211.8 PROTO=UDP SPT=22008 DPT=51413
  </code></pre>