From f2e67113587cba859449cbb6c95fc57424157837 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 12 Jun 2022 18:46:27 +0200 Subject: Added cth --- cth | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 cth (limited to 'cth') diff --git a/cth b/cth new file mode 100755 index 0000000..6eb5c0c --- /dev/null +++ b/cth @@ -0,0 +1,8 @@ +#!/bin/sh + +# Print a function or struct defintion from a C file +# see https://sebastiano.tronto.net/blog/2022-06-12-shell-ide-sed + +name=$1 +shift +sed -n "/^$name/,/^}/ p" $@ -- cgit v1.3