Linux/Parsing: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 11: Line 11:
*  
*  


== sed & awk ==
* sed + control characters
* sed + control characters
<blockquote>
<blockquote>
Line 18: Line 19:
</blockquote>
</blockquote>


* slowing output
<blockquote>
<blockquote>
<pre>
<pre>
cat incoming.log | pv -qL 1000 | tee temp
sed -n '/Iowa/,/Montana/p'
</pre>
</pre>
</blockquote>
</blockquote>




*
== other ==
* slowing output
<blockquote>
<blockquote>
<pre>
<pre>
sed -n '/Iowa/,/Montana/p'
cat incoming.log | pv -qL 1000 | tee temp
</pre>
</pre>
</blockquote>
</blockquote>


* show as hex
* show as hex

Revision as of 14:08, 4 August 2020

lines

  • grep
  • tail
tail 
tail -f                # follow
tail -n 10             # last 10 lines 

sed & awk

  • sed + control characters
sed 's/\x00/controlcharwashere/g'
sed -n '/Iowa/,/Montana/p'


other

  • slowing output
cat incoming.log | pv -qL 1000 | tee temp
  • show as hex
od -t x1 -An