diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-08 00:59:11 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-08 00:59:11 -0700 |
commit | cc50dcc4918c82cee17d9715ec4bf2d588938042 (patch) | |
tree | 24910f05d6cd929f87e5f8c19fea403cbec4463b | |
parent | ee703a7af485ecdd2b8c96b0ad87f10d6b71a1fc (diff) | |
download | rainbows-cc50dcc4918c82cee17d9715ec4bf2d588938042.tar.gz |
Useful for prefixing individual lines of a temporary file while catting it to stdout. This helps make tests easier to write and test.
-rw-r--r-- | t/test-lib.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index c8e069d..e5b0bc8 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -50,3 +50,9 @@ rtmpfiles () { _TEST_RM_LIST="$_TEST_RM_LIST $_tmp" done } + +dbgcat () { + id=$1 + eval '_file=$'$id + sed -e "s/^/$id:/" < $_file +} |