From 60052659b98832c78c902e4f27ecee2663d8e913 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 6 May 2026 08:30:49 +0200 Subject: Added scripts --- scripts/cth | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/cth (limited to 'scripts/cth') diff --git a/scripts/cth b/scripts/cth new file mode 100755 index 0000000..4fd109d --- /dev/null +++ b/scripts/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