blob: 72caf1db0912b3c4fb3f3900c8c9d8a473dba587 [file] [log] [blame]
sewardjebf67cc2005-05-24 14:46:02 +00001#! /bin/sh
2
3./filter_stderr |
4sed "s/<tid>[0-9]*<\/tid>/<tid>...<\/tid>/" |
5sed "s/<pid>[0-9]*<\/pid>/<pid>...<\/pid>/" |
6sed "s/<ppid>[0-9]*<\/ppid>/<ppid>...<\/ppid>/" |
7sed "s/<obj>.*<\/obj>/<obj>...<\/obj>/" |
sewardje5f98d92005-06-15 21:34:35 +00008sed "s/<line>.*<\/line>/<line>...<\/line>/" |
sewardj3d7bb542005-07-02 20:41:25 +00009sed "s/<dir>.*<\/dir>/<dir>...<\/dir>/" |
10sed "s/<count>.*<\/count>/<count>...<\/count>/" |
sewardj45f4e7c2005-09-27 19:20:21 +000011sed "s/\(m_replacemalloc\/\)\?vg_replace_malloc.c/vg_replace_malloc.c/" |
njn483398e2005-07-20 03:03:44 +000012perl -0 -p -e "s/<suppcounts>.*<\/suppcounts>/<suppcounts>...<\/suppcounts>/s" |
sewardj33e60422005-07-24 07:33:15 +000013perl -p -e "s/<time>.*<\/time>/<time>...<\/time>/s" |
njn483398e2005-07-20 03:03:44 +000014perl -0 -p -e "s/<vargv>.*<\/vargv>/<vargv>...<\/vargv>/s"
sewardj3d7bb542005-07-02 20:41:25 +000015
16# Collected wisdom re Perl magic incantation:
17#
18# From: Tom Hughes
19#
20# Two problems - one is that you need -p to force perl to loop over
21# the input lines and apply your expression to each one and then print
22# the results.
23#
24# The other is that as somebody else said you need to change the input
25# record separator so that it reads in the whole file as a single line
njnac31b052009-02-12 00:30:02 +000026# (which means we can do multi-line matching in a single regexp) which you
27# can do with the -0 switch.
sewardj3d7bb542005-07-02 20:41:25 +000028#
29# Hence -0 -p.