Linux/Parsing: Unterschied zwischen den Versionen

Aus Wiki
Wechseln zu: Navigation, Suche
Zeile 11: Zeile 11:
 
*  
 
*  
  
 +
== sed & awk ==
 
* sed + control characters
 
* sed + control characters
 
<blockquote>
 
<blockquote>
Zeile 18: Zeile 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

Version vom 4. August 2020, 14:08 Uhr

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