-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove use of tmp file, thanks to Robert Elz for the hint * fix problem with ':' in wrong place, found by Matthias Scheler
- Loading branch information
hubertf
committed
Nov 11, 2003
1 parent
36d58f5
commit 6547b28
Showing
3 changed files
with
8 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
#!/bin/sh | ||
# $NetBSD: dmesg2gif,v 1.3 2003/10/20 17:11:43 hubertf Exp $ | ||
# $NetBSD: dmesg2gif,v 1.4 2003/11/11 16:30:46 hubertf Exp $ | ||
# | ||
# Copyright (c) 2003 Hubert Feyrer <[email protected]> | ||
# | ||
|
||
tmp=/tmp/dmesg2gif.$$.dot | ||
|
||
# Clean up things on ^C | ||
trap "rm -r $tmp ; exit 1" INT | ||
|
||
if [ -t 0 -o -t 1 ] | ||
then | ||
echo 2>&1 "Usage: cat /var/run/dmesg.boot | $0 | xv -" | ||
|
@@ -21,13 +16,9 @@ fi | |
cat \ | ||
| grep -v ^# \ | ||
| perl -ne 'if(/^(\S*) at (\S*) *.*/){ | ||
$from=$1; | ||
$to=$2; | ||
$to=~s/://; | ||
( $from = $1 ) =~ s/://g; | ||
( $to = $2 ) =~ s/://g; | ||
print "\t$from -> $to\n"; | ||
}' | ||
echo "}" | ||
) > $tmp | ||
dot -Tgif $tmp | ||
|
||
rm $tmp | ||
) | tee /tmp/x.debug | dot -Tgif |