Linux/Parsing: Unterschied zwischen den Versionen

Aus Wiki
Wechseln zu: Navigation, Suche
Zeile 6: Zeile 6:
 
tail  
 
tail  
 
tail -f                # follow
 
tail -f                # follow
tail -n 10            # last 10 lines  
+
tail -n 10            # last 10 lines
 +
tail +3                # skip first 3 lines  
 
</pre>
 
</pre>
 
</blockquote>
 
</blockquote>
 
*  
 
*  
 +
 +
== delimiter ==
 +
* cut
 +
  
 
== sed & awk ==
 
== sed & awk ==

Version vom 4. August 2020, 14:44 Uhr

lines

  • grep
  • tail
tail 
tail -f                # follow
tail -n 10             # last 10 lines
tail +3                # skip first 3 lines 

delimiter

  • cut


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



Links