Sed

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "==Follow a search for a file== <source lang="bash"> LD_LIBRARY_PATH=/opt/gst/lib/ GST_PLUGIN_PATH=/opt/gst/lib/gstreamer-0.10/ /opt/strace /opt/gst/bin/gst-inspect 2>&1 | tee ...")
 
m
Line 1: Line 1:
 
==Follow a search for a file==
 
==Follow a search for a file==
 +
For example, while debugging a non-working GStreamer install:
 
<source lang="bash">
 
<source lang="bash">
LD_LIBRARY_PATH=/opt/gst/lib/ GST_PLUGIN_PATH=/opt/gst/lib/gstreamer-0.10/ /opt/strace /opt/gst/bin/gst-inspect 2>&1 | tee gst-inspect.out | grep -r ^open | sed -re 's#^(open\(")(([^"/]*/)*)([^"]*)(".* = )([-0-9]*)(.*)$#\4\t\6\t \1\2\4\5\6\7#' | sort
+
LD_LIBRARY_PATH=/opt/gst/lib/ GST_PLUGIN_PATH=/opt/gst/lib/gstreamer-0.10/ /opt/strace /opt/gst/bin/gst-inspect 2>&1 |
 +
  tee gst-inspect.out |
 +
  grep -r ^open |
 +
  sed -re 's#^(open\(")(([^"/]*/)*)([^"]*)(".* = )([-0-9]*)(.*)$#\4\t\6\t \1\2\4\5\6\7#' |
 +
  sort
 
</source>
 
</source>

Revision as of 15:59, 30 July 2012

Follow a search for a file

For example, while debugging a non-working GStreamer install:

LD_LIBRARY_PATH=/opt/gst/lib/ GST_PLUGIN_PATH=/opt/gst/lib/gstreamer-0.10/ /opt/strace /opt/gst/bin/gst-inspect 2>&1 |
  tee gst-inspect.out |
  grep -r ^open |
  sed -re 's#^(open\(")(([^"/]*/)*)([^"]*)(".* = )([-0-9]*)(.*)$#\4\t\6\t \1\2\4\5\6\7#' |
  sort
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox